Yes, I get the same error on script/console. Here’s my script/server
#!/usr/bin/env ruby
require File.dirname(FILE) + ‘/…/config/boot’
require ‘commands/server’
Yes, I get the same error on script/console. Here’s my script/server
#!/usr/bin/env ruby
require File.dirname(FILE) + ‘/…/config/boot’
require ‘commands/server’
Thank you.
-VS
Looks normal to me.
What RAILS_GEM_VERSION is in your config/environment.rb ?
This might mean something… When I run ‘gem install rails’ as the
local user( in the previous attempt I ran this as root), I get
WARNING: Installing to ~/.gem since /Library/Ruby/Gems/1.8 and
/usr/bin aren’t both writable.
WARNING: You don’t have /Users/vs/.gem/ruby/1.8/bin in your PATH,
gem executables will not run.
This is definetely working with ruby 1.8.6. Here’s the output using
the old version of ruby :
oldruby script/server
=> Booting Mongrel
=> Rails 2.3.2 application starting on http://0.0.0.0:3000
=> Call with -d to detach
=> Ctrl-C to shutdown server
But when I try :
ruby script/server,
Missing the Rails 2.3.2 gem
When you built ruby 1.9.1 from source, did you go all the way to make
install? If so, what was the root (config --prefix=/???) that you
gave prior to the initial make?
I’ve found that just linking in the executable with major releases of
anything is often the shortest path to disfunction.
Here’s a sequence you could use to build a parallel RoR suite.
Identify a new root for your RoR install suite like: /opt/RoR.
Create that directory and make yourself be owner (so you won’t need to
sudo all the time).
In your Ruby source directory type:
2a) ./configure --prefix=/opt/RoR
2b) make
2c) make install
You’ll now have /opt/RoR/bin, /opt/RoR/lib, … with your new ruby in
place.
In a term window type:
3a) PATH=/opt/RoR/bin:$PATH
3b) ruby --version You should see something like:
ruby 1.9.1p0 (2009-01-30 revision 21907) [powerpc-darwin9.6.0]
3c) gem install rake rack
3d) gem install rails
Now you’ve got a new RoR suite that’s available if your path is
modified as in step 3a, else you’ve got your original RoR setup
(assuming you haven’t already blown it away).
Hi, is Rails being installed in the correct place? Also, you’ll need
to install thin if you’re working with Rails 2.3.x and Ruby 1.9.1.
Thus, you should be able to install it by doing the following:
update: if I do “sudo gem install rails”, I get :
Successfully installed rails-2.3.2
1 gem installed
But if I do script/server: I still get:
Missing the Rails 2.3.2 gem
What am I missing ?
I bet that the gem executable is still the ruby 1.8 version (ie that
installs gems for ruby 1.8). The one that installs for ruby 1.9 is
probably called gem19 or something like that.
When you followed gregs advice you ended up sort of “fooling” the ruby
command. now you have two of everything (2 rails gems, one under 1.8
and one under 1.9).
make sure you are calling the correct gem from the correct place. If i
were you, i would uninstall one of your ruby instalations (at this
point 1.8)
Maybe i wasnt using the correct terminlogy, that having been done by
years of explaining such concepts to people that dont know what
binaries are and english not being my first language.
Nevertheless, VS is using one version of ruby with one set of gems and
running the other version which doesnt happen to have those set of
gems, and this happened by following your advice. That is what i was
trying to say.
so, here are my 2 cents. use defaults for starters, dont go for the
installing in som/weird/place/, have one version of ruby and one set
of gems, like this you are less likely to run into these problems.