After updating, script/server fails with this stack trace:
script/server -u
/…/1.8/rubygems.rb:223:in activate': undefined methodmap’ for
nil:NilClass (NoMethodError)
from /…/1.8/rubygems/custom_require.rb:35:in require' from <project>/vendor/rails/railties/lib/commands/server.rb:1 from /.../1.8/rubygems/custom_require.rb:31:ingem_original_require’
from /…/1.8/rubygems/custom_require.rb:31:in `require’
from script/server:3
script/server:3 is a blank line after “require ‘action_controller’”
How to reinstall the rails stuff in the application folder after
removing the old components?
You would do better to try and make your questions more easy to
understand.
Do you mean updating the scripts and so on? If so then
rake rails:update
There is no need to remove the old ones first (I don’t know whether it
will cause a problem or not).
If you want to use a later version of rails in the app you will first
have to update the RAILS_GEM_VERSION line in environment.rb
I do not know whether it is part of the problem but you should not use
sudo here.
I was in the top level folder, w/o sudo, I get the same crash.
Have you tried just making a new rails app to make sure that is ok?
If that works then it is an issue with your existing app, if it
doesn’t it is a problem with your system.
Do you mean to create a new rails app and copy my sources into the new
project?
If that works then it is an issue with your existing app, if it
doesn’t it is a problem with your system.
It is for sure a problem from updating ruby/rails, since the app worked
until I tried to update and I didn’t touch any sources.
Do you mean updating the scripts and so on? If so then
rake rails:update
Running rake rails:update seems to end in a similar problem, as running
script/server:
sudo rake --trace rails:update
I do not know whether it is part of the problem but you should not use
sudo here. You should be in the top level folder of the rails
application (the folder with app, config etc in it) then just
rake rails_update
with --trace if you like.
Have you tried just making a new rails app to make sure that is ok?
If that works then it is an issue with your existing app, if it
doesn’t it is a problem with your system.
It is for sure a problem from updating ruby/rails, since the app worked
until I tried to update and I didn’t touch any sources.
You do not know (or at least I do not know) whether it is a problem
with your app being incompatible with the updated system, or whether
it is a fundamental problem with your system such that it cannot run
any rails app at all.
As I said yesterday: it’s not my app which is broken, it is my rails
environment: a new generated project gest started with script/server
Do you mean to create a new rails app and copy my sources into the new
project?
No, make a new rails app and check that it works without any of your
sources. That will prove that a rails app can work on your system.
If that works then it is an issue with your existing app, if it
doesn’t it is a problem with your system.
It is for sure a problem from updating ruby/rails, since the app worked
until I tried to update and I didn’t touch any sources.
You do not know (or at least I do not know) whether it is a problem
with your app being incompatible with the updated system, or whether
it is a fundamental problem with your system such that it cannot run
any rails app at all. In other words whether you need to fix your
system or fix your app to be compatible with your system. The above
test (making a new simple app and making sure it works) should show
that.
Colin
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.