Im new to Ruby and isntalled Rails on Windows 8. I tried typing this in
IRB run it normal or as administrator and getting this result.

might have duplicated this post, first time posting on the group did not
see where my post is :)


irb(main):001:0> mkdir lesson2
NameError: undefined local variable or method `lesson2' for main:Object
         from (irb):1
         from C:/RailsInstaller/Ruby1.9.3/bin/irb:12:in `<main>'
irb(main):002:0> cd lesson


--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/784ed9b2-58d9-4a1a-8b1b-bf77db4c6abd%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Search Discussions

  • Oliver David at Jun 21, 2013 at 2:26 pm
    I'm new to Ruby. I installed Rails on Windows 8.

    When I type mkdir in IRB, I'm getting this. I tried running the IRB as
    administrator too, and still get the same result


    irb(main):001:0> mkdir lesson2
    NameError: undefined local variable or method `lesson2' for main:Object
             from (irb):1
             from C:/RailsInstaller/Ruby1.9.3/bin/irb:12:in `<main>'
    irb(main):002:0> cd lesson

    --
    You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
    To post to this group, send email to rubyonrails-talk@googlegroups.com.
    To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/eeef5f0a-4225-4f9b-9ac0-30aafb351ff0%40googlegroups.com.
    For more options, visit https://groups.google.com/groups/opt_out.
  • Colin Law at Jun 21, 2013 at 2:50 pm

    On 21 June 2013 14:12, Oliver David wrote:
    I'm new to Ruby. I installed Rails on Windows 8.

    When I type mkdir in IRB, I'm getting this. I tried running the IRB as
    administrator too, and still get the same result


    irb(main):001:0> mkdir lesson2
    NameError: undefined local variable or method `lesson2' for main:Object
    from (irb):1
    from C:/RailsInstaller/Ruby1.9.3/bin/irb:12:in `<main>'
    irb(main):002:0> cd lesson
    Those commands (mkdir and cd) are not supposed to be run in irb (which
    is for ruby code), but in a console window. Whether they work in
    Windows anyway I do not know. I strongly advise not to use Windows
    for developing RoR applications, it is much easier in Linux (Ubuntu
    for example) or Mac.

    Colin
    --
    You received this message because you are subscribed to the Google Groups
    "Ruby on Rails: Talk" group.
    To unsubscribe from this group and stop receiving emails from it, send an
    email to rubyonrails-talk+unsubscribe@googlegroups.com.
    To post to this group, send email to rubyonrails-talk@googlegroups.com.
    To view this discussion on the web visit
    https://groups.google.com/d/msgid/rubyonrails-talk/eeef5f0a-4225-4f9b-9ac0-30aafb351ff0%40googlegroups.com.

    For more options, visit https://groups.google.com/groups/opt_out.
    --
    You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
    To post to this group, send email to rubyonrails-talk@googlegroups.com.
    To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/CAL%3D0gLsJRDW-wc8wMLLitR5DXo4vFKYhgigaRnRnccfQLv-FcQ%40mail.gmail.com.
    For more options, visit https://groups.google.com/groups/opt_out.
  • Oliver David at Jun 22, 2013 at 2:56 am
    I used the cmd prompt Windows and type IRB to start and get that error.



    On Friday, June 21, 2013 10:49:39 AM UTC-4, Colin Law wrote:

    On 21 June 2013 14:12, Oliver David <oda...@gmail.com <javascript:>>
    wrote:
    I'm new to Ruby. I installed Rails on Windows 8.

    When I type mkdir in IRB, I'm getting this. I tried running the IRB as
    administrator too, and still get the same result


    irb(main):001:0> mkdir lesson2
    NameError: undefined local variable or method `lesson2' for main:Object
    from (irb):1
    from C:/RailsInstaller/Ruby1.9.3/bin/irb:12:in `<main>'
    irb(main):002:0> cd lesson
    Those commands (mkdir and cd) are not supposed to be run in irb (which
    is for ruby code), but in a console window. Whether they work in
    Windows anyway I do not know. I strongly advise not to use Windows
    for developing RoR applications, it is much easier in Linux (Ubuntu
    for example) or Mac.

    Colin
    --
    You received this message because you are subscribed to the Google Groups
    "Ruby on Rails: Talk" group.
    To unsubscribe from this group and stop receiving emails from it, send an
    email to rubyonrails-ta...@googlegroups.com <javascript:>.
    To post to this group, send email to rubyonra...@googlegroups.com<javascript:>.
    To view this discussion on the web visit
    https://groups.google.com/d/msgid/rubyonrails-talk/eeef5f0a-4225-4f9b-9ac0-30aafb351ff0%40googlegroups.com.
    For more options, visit https://groups.google.com/groups/opt_out.
    --
    You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
    To post to this group, send email to rubyonrails-talk@googlegroups.com.
    To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/e0a72d8d-ba65-4aa1-961b-9ec69a79e6c5%40googlegroups.com.
    For more options, visit https://groups.google.com/groups/opt_out.
  • Victor Goff at Jun 22, 2013 at 3:22 am
    IRB is not the command line. Use the command line to mkdir.

    On Fri, Jun 21, 2013 at 10:56 PM, Oliver David wrote:

    I used the cmd prompt Windows and type IRB to start and get that error.
    On Friday, June 21, 2013 10:49:39 AM UTC-4, Colin Law wrote:
    On 21 June 2013 14:12, Oliver David wrote:
    I'm new to Ruby. I installed Rails on Windows 8.

    When I type mkdir in IRB, I'm getting this. I tried running the IRB as
    administrator too, and still get the same result


    irb(main):001:0> mkdir lesson2
    NameError: undefined local variable or method `lesson2' for main:Object
    from (irb):1
    from C:/RailsInstaller/Ruby1.9.3/**bin/irb:12:in `<main>'
    irb(main):002:0> cd lesson
    Those commands (mkdir and cd) are not supposed to be run in irb (which
    is for ruby code), but in a console window. Whether they work in
    Windows anyway I do not know. I strongly advise not to use Windows
    for developing RoR applications, it is much easier in Linux (Ubuntu
    for example) or Mac.

    Colin
    --
    You received this message because you are subscribed to the Google Groups
    "Ruby on Rails: Talk" group.
    To unsubscribe from this group and stop receiving emails from it, send an
    email to rubyonrails-ta...@**googlegroups.com.
    To post to this group, send email to rubyonra...@googlegroups.**com.
    To view this discussion on the web visit
    https://groups.google.com/d/**msgid/rubyonrails-talk/**
    eeef5f0a-4225-4f9b-9ac0-**30aafb351ff0%40googlegroups.**com<https://groups.google.com/d/msgid/rubyonrails-talk/eeef5f0a-4225-4f9b-9ac0-30aafb351ff0%40googlegroups.com>.
    For more options, visit https://groups.google.com/**groups/opt_out<https://groups.google.com/groups/opt_out>.
    --
    You received this message because you are subscribed to the Google Groups
    "Ruby on Rails: Talk" group.
    To unsubscribe from this group and stop receiving emails from it, send an
    email to rubyonrails-talk+unsubscribe@googlegroups.com.
    To post to this group, send email to rubyonrails-talk@googlegroups.com.
    To view this discussion on the web visit
    https://groups.google.com/d/msgid/rubyonrails-talk/e0a72d8d-ba65-4aa1-961b-9ec69a79e6c5%40googlegroups.com
    .
    For more options, visit https://groups.google.com/groups/opt_out.

    --
    You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
    To post to this group, send email to rubyonrails-talk@googlegroups.com.
    To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/CA%2BqZRNkoqkKCoGx%3DCBnabFkm-n_sT2NoSwDAqRxM_-fxR%3D78VQ%40mail.gmail.com.
    For more options, visit https://groups.google.com/groups/opt_out.
  • Oliver David at Jun 22, 2013 at 7:27 am
    I got it working. Thanks for helping.
    On Friday, June 21, 2013 11:22:05 PM UTC-4, kotp wrote:

    IRB is not the command line. Use the command line to mkdir.


    On Fri, Jun 21, 2013 at 10:56 PM, Oliver David <oda...@gmail.com<javascript:>
    wrote:
    I used the cmd prompt Windows and type IRB to start and get that error.
    On Friday, June 21, 2013 10:49:39 AM UTC-4, Colin Law wrote:
    On 21 June 2013 14:12, Oliver David wrote:
    I'm new to Ruby. I installed Rails on Windows 8.

    When I type mkdir in IRB, I'm getting this. I tried running the IRB as
    administrator too, and still get the same result


    irb(main):001:0> mkdir lesson2
    NameError: undefined local variable or method `lesson2' for
    main:Object
    from (irb):1
    from C:/RailsInstaller/Ruby1.9.3/**bin/irb:12:in `<main>'
    irb(main):002:0> cd lesson
    Those commands (mkdir and cd) are not supposed to be run in irb (which
    is for ruby code), but in a console window. Whether they work in
    Windows anyway I do not know. I strongly advise not to use Windows
    for developing RoR applications, it is much easier in Linux (Ubuntu
    for example) or Mac.

    Colin
    --
    You received this message because you are subscribed to the Google Groups
    "Ruby on Rails: Talk" group.
    To unsubscribe from this group and stop receiving emails from it, send an
    email to rubyonrails-ta...@**googlegroups.com.
    To post to this group, send email to rubyonra...@googlegroups.**com.
    To view this discussion on the web visit
    https://groups.google.com/d/**msgid/rubyonrails-talk/**
    eeef5f0a-4225-4f9b-9ac0-**30aafb351ff0%40googlegroups.**com<https://groups.google.com/d/msgid/rubyonrails-talk/eeef5f0a-4225-4f9b-9ac0-30aafb351ff0%40googlegroups.com>.
    For more options, visit https://groups.google.com/**groups/opt_out<https://groups.google.com/groups/opt_out>.
    --
    You received this message because you are subscribed to the Google Groups
    "Ruby on Rails: Talk" group.
    To unsubscribe from this group and stop receiving emails from it, send an
    email to rubyonrails-ta...@googlegroups.com <javascript:>.
    To post to this group, send email to rubyonra...@googlegroups.com<javascript:>
    .
    To view this discussion on the web visit
    https://groups.google.com/d/msgid/rubyonrails-talk/e0a72d8d-ba65-4aa1-961b-9ec69a79e6c5%40googlegroups.com
    .
    For more options, visit https://groups.google.com/groups/opt_out.

    --
    You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
    To post to this group, send email to rubyonrails-talk@googlegroups.com.
    To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/a7b5d1a2-da4e-4e23-abee-e82bb3eca96e%40googlegroups.com.
    For more options, visit https://groups.google.com/groups/opt_out.
  • Nick van der Wildt at Jun 21, 2013 at 3:12 pm
    Hi there,

    The problem is that you're trying to run a command that's not a part of
    Ruby, but just part of the basic command tools Windows provides. When
    you type "mkdir lesson2", you're giving the command to create a folder
    named "lesson2", however, like I said, this is not part of Ruby and IRB.

    Solution is to exit IRB (CTRL+D?) and then putting the command "mkdir
    lesson2", after which you can open IRB again to try some Ruby code.

    I hope this helps! If you have any other questions, feel free to let me
    know :-)

    --
    Posted via http://www.ruby-forum.com/.

    --
    You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
    To post to this group, send email to rubyonrails-talk@googlegroups.com.
    To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/cde6563cbcec5ea0671e4cdd472a2a38%40ruby-forum.com.
    For more options, visit https://groups.google.com/groups/opt_out.
  • Joel Pearson at Jun 21, 2013 at 4:04 pm
    You can also execute system commands from within irb using "system"
    system( "mkdir lesson2" )
    or backticks
    `mkdir lesson2`

    Although in the case of "mkdir" you'll probably want to use "Dir.pwd" to
    check you're in the right directory, and "Dir.chdir('c:/myfolder')" to
    move to the correct folder first.

    --
    Posted via http://www.ruby-forum.com/.

    --
    You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
    To post to this group, send email to rubyonrails-talk@googlegroups.com.
    To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/4432e7cfb49874eb344e74708f68dfca%40ruby-forum.com.
    For more options, visit https://groups.google.com/groups/opt_out.

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouprubyonrails-talk @
categoriesrubyonrails
postedJun 21, '13 at 2:26p
activeJun 22, '13 at 7:27a
posts8
users4
websiterubyonrails.org
irc#RubyOnRails

People

Translate

site design / logo © 2021 Grokbase