Topic: Gem installation Problem / Controller generation problem

I am new to ROR.


I Have ruby and instant rails installed in my system(I am using Windows). I have created an application 'railslist' 
[command i used:-   c:\development\rails railslist  ]

But when I tried to generate a controller
[ c:\development\railslist\ruby script/generate controller App  ] I got the following error

------------------------------------------------
Cannot find gem for Rails ~>1.2.3.0:
    Install the missing gem with 'gem install -v=1.2.3 rails', or
    change environment.rb to define RAILS_GEM_VERSION with your desired version.

-----------------------------------------------

Actually my gem version is 0.9.2 which i knew using the command 'gem -v'

and i tried 'gem install rails --include-dependencies' too and got another error as follows


-----------------------
ERROR:  While executing gem ... (Gem::RemoteFetcher::FetchError)
    Bad file descriptor - connect(2)(Errno::EBADF)

----------------------


I dont know wht the problem could be...

Please help

Re: Gem installation Problem / Controller generation problem

I am running Rails on MacOS X, created a sample app, then ran script/generate and get the same error message:

Cannot find gem for Rails ~>1.2.3.0
Install the missing gem with 'gem install -v=1.2.3 rails', or ....
When I change the appropriate line in this app's environment.rb to 1.2.3.0 then re-run this command, I get the error message:

Cannot find gem for Rails ~>1.2.3.0.0
Install the missing gem with 'gem install -v=1.2.3.0 rails', or ....

So the problem is not in the application, but something in the rails installation, I surmise.

Last edited by oyg661 (2007-08-10 13:53:26)