Thanks for faster reply. Iam having an question. I followed the steps in
the tutorial to create an application. In doing so everything went fine.
But when I ran this command 'ruby script\generate scaffold recipe
recipe' i get an error message "undefined method 'gem' for main:Object
<NoMethodError>
Please help me in this regard.
You may need to install RubyGems. If you type "gem" at the command prompt does it find something? The downloads for RubyGems are here:
Thanks for faster reply. Iam having an question. I followed the steps in
the tutorial to create an application. In doing so everything went fine.
But when I ran this command 'ruby script\generate scaffold recipe
recipe' i get an error message "undefined method 'gem' for main:Object
<NoMethodError>
Please help me in this regard.
You may need to install RubyGems. If you type "gem" at the command
prompt does it find something? The downloads for RubyGems are here:
Yes when i type gem a command window opens and closes immediately. Have i installed gems or do i need to install it? I think i have installed rubygems. when i click start->programs->Ruby->Ruby182-15->RubyGems. I could find rubygems. Then what could be wrong.
Sounds like you're typing the "gem" command in the "Run..." dialog. If so, don't do that; do "cmd" in the "Run..." dialog to get a command window. Then type the "gem" command in that window and you should get back errors.
By typing it in the run dialog, windows just tries to run the gem program (opening a console to do so) and it fails, so it exits and closes the console.
Post the errors you get and hopefully someone can help here. Apologies if I've totally misunderstood.
Yes when i type gem a command window opens and closes immediately.
Sounds like you're typing the "gem" command in the "Run..." dialog.
When I do so I get an message like this.
Ruby gems is a sophisticated package manager for ruby. This is a basic help message containing pointers to more information.
some other help commands to follow...
Am i in the right direction?
Well, yeah... that's what just running gem should give you... sounds like you have rubygems installed.
Hmm, I just went back and looked at your original question: what would cause "undefined method 'gem' for main:Object <NoMethodError>"? I pondered that for few minutes and on a hunch I tried typing the "gem" command in a Ruby irb session and that's the exact error I get.
Now, how you managed to get that error from running "ruby script\generate scaffold recipe" on the command line I'm not sure...
I guess my suggestions would be to make sure you are running that command at a windows command prompt and to maybe go back to the beginning of the tutorial you're using and make sure you've done each step exactly right.