Hi, since I updated ruby using Mac Ports (on Leopard) I have got several problems and I also had to reinstall gems. Now when I run Mongrel I keep getting the error "Missing these required gems" followed by the list of gems that I required in environment.rb but that gems seems to be correctly installed as I see running gem list
.
I think that rails is looking for a previous installation, but I don't know how to configure it to use the new ruby/gem path.
Thanks!
-
Are you sure the gem command is actually the one installed by MacPorts and not the included default from OSX?
collimarco : I think it's the one installed by MacPorts: typing "which gem" I get "/opt/local/bin/gem". It seems that rails doesn't use the same gems as the line command "gem".. -
This railswiki-entry gives lots of insight into handling of multiple gem-repositories. Maybe you find a clue there that solves your problem. Hope it helps
http://wiki.rubyonrails.org/rails/pages/HowToUseMultipleGemRepositories
Update: The above link is broken, the text has been saved here though: http://tek-zappeln.blogspot.com/2009/02/howtousemultiplegemrepositories-rescued.html
Jonathan : link seems to be broken -
Try this at the Terminal, and see whether the paths are similar:
which ruby which gem
I had a similar problem just the other week, and had to rename the original gem binary so it would find the MacPorts-installed one.
collimarco : $ which ruby /opt/local/bin/ruby $ which gem /opt/local/bin/gem -
You can force it to use a particular version of ruby with:
/path/to/ruby -S <command>
You could force your rails application to start using whichever version of ruby you want, you could also use this to run your gem list command and make sure you have the correct gems before you run rails.
-
You should use :
config.gem 'rspec', :lib => 'spec' config.gem 'rspec-rails', :lib => 'spec/rails'
because rspec libs are not named as it should ...
jamuraa : +1 fixed my problem thanks! -
Did you find a solution?
0 comments:
Post a Comment