Hi All.
Ive heard so much about RoR now Iand i would really like to get my
hands dirty. Only trouble is i just cant seem to get it up and
running:
Ive followed the hivelogic instructions several times on two different
mac’s.
when i start an app, and then try to $script/server, i get a message
telling me:
" i dont have ruby gems and to install it
upon trying to install it again:
$ sudo gem install rails
/usr/local/lib/ruby/1.8/thread.rb:5:in require': no such file to load -- thread.so (LoadError) from /usr/local/lib/ruby/1.8/thread.rb:5 from /usr/local/lib/ruby/site_ruby/1.8/rubygems.rb:10:inrequire’
from /usr/local/lib/ruby/site_ruby/1.8/rubygems.rb:10
from /usr/local/bin/gem:8:in `require’
from /usr/local/bin/gem:8
there seems to be conflicting paths / versions of rubygems, i cant
tell which. either way somethings pointing to the wrong thing. Please
could anyone help?
Much Appreciated
" i dont have ruby gems and to install it
from /usr/local/bin/gem:8
there seems to be conflicting paths / versions of rubygems, i cant
tell which. either way somethings pointing to the wrong thing. Please
could anyone help?
Much Appreciated
Jez
Hi, you could have simply used the currently installed version of Ruby
and Rubygems located in /usr/bin. Then you could have simply performed
the following steps:
Ok so no joy there, still getting exact same messages
sudo gem update --system
/usr/local/lib/ruby/1.8/thread.rb:5:in require': no such file to load -- thread.so (LoadError) from /usr/local/lib/ruby/1.8/thread.rb:5 from /usr/local/lib/ruby/site_ruby/1.8/rubygems.rb:10:inrequire’
from /usr/local/lib/ruby/site_ruby/1.8/rubygems.rb:10
from /usr/local/bin/gem:8:in `require’
from /usr/local/bin/gem:8
Hello again,
Ok ive removed that from my path, and still get similar error
$ sudo gem update --system
Password:
/usr/local/lib/ruby/1.8/thread.rb:5:in require': no such file to load -- thread.so (LoadError) from /usr/local/lib/ruby/1.8/thread.rb:5 from /usr/local/lib/ruby/site_ruby/1.8/rubygems.rb:10:inrequire’
from /usr/local/lib/ruby/site_ruby/1.8/rubygems.rb:10
from /usr/local/bin/gem:8:in `require’
from /usr/local/bin/gem:8
Sorry if im missing something.
Should my path contain anything at all?
thanks
Can you paste in exactly what is in your PATH now? That might help
clear up where the problem is. And yes, if you are following the
Hivelogic instructions for the Ruby/Rails/Gem install you will need
something in your PATH.
I found myself pointed to the Hivelogic tutorials from most places ie lynda.com & ADC.
I’m not sure about the lynda.com stuff, but the ADC articles date from a
time when Rails wasn’t packaged with the OS (i.e., before Leopard).
Since Leopard, the bundled Ruby and Rails stack should work fine.
Can you paste in exactly what is in your PATH now? That might help
clear up where the problem is. And yes, if you are following the
Hivelogic instructions for the Ruby/Rails/Gem install you will need
something in your PATH.
I don’t think the problem is in the path, it’s a .so file what can’t be
loaded.
It’s more likely an ldconfig problem, I have no idea how MacOS works,
but I think you should look for your LD_LIBRARY_PATH or equivalent.
There’s nothing currently in my path profile file (that is what you
all mean?) I removed it at Conrads request.
as per hivelogic it was previously
export PATH="/usr/local/bin:/usr/local/sbin:/usr/local/mysql/bin:
$PATH"
Even without this i am receiving a similar error.
If i understand correctly, i Have managed to duplicate both or either
ruby & rubyGems, and so one ruby, or the other, is pointing to the
wrong place for rubyGems and telling me i dont have it installed.
Hence:
gem --version
/usr/local/lib/ruby/1.8/thread.rb:5:in require': no such file to load -- thread.so (LoadError) from /usr/local/lib/ruby/1.8/thread.rb:5 from /usr/local/lib/ruby/site_ruby/1.8/rubygems.rb:10:inrequire’
from /usr/local/lib/ruby/site_ruby/1.8/rubygems.rb:10
from /usr/local/bin/gem:8:in `require’
from /usr/local/bin/gem:8
Notice in the path its going to usr/local/lib
(i presume this is from the pre existing mac leopard installation of
ruby)
Apologies for my very basic command line knowledge, but i appear to be
learning an awful lot very quickly.
Thanks all for the great response. im really keen to progress.
If i understand correctly, i Have managed to duplicate both or either
$ ruby --version
ruby 1.8.7 (2008-08-11 patchlevel 72) [i686-darwin9.7.0]
You are trying for executable files, and your problem is a shared
library.
Notice in the path its going to usr/local/lib
Jez
I don’t think the problem is in the path, it’s a .so file what can’t be loaded.
It’s more likely an ldconfig problem, I have no idea how MacOS works,
but I think you should look for your LD_LIBRARY_PATH or equivalent.
OK, so back to basics:
Why every time i modify .profile does it just keep adding new stuff
in?
This is the standard way in which it works. When you start up a shell
a new shell or execute ‘source .profile’, the .profile file is executed
and
the variables are published back to the OS.
After setting it several times, im getting duplicate entries for
directories?
/usr/local/bin:/usr/local/sbin:/usr/local/mysql/bin:/usr/bin:/bin:/usr/
sbin:/sbin:/usr/local/bin:/usr/X11/bin
Just simply start a new shell.
J
I would recommend reading a book on basic unix and I wish
that the information helped.
OK, so back to basics:
Why every time i modify .profile does it just keep adding new stuff
in?
After setting it several times, im getting duplicate entries for
directories?
/usr/local/bin:/usr/local/sbin:/usr/local/mysql/bin:/usr/bin:/bin:/usr/
sbin:/sbin:/usr/local/bin:/usr/X11/bin
when echo’d my $PATH just keeps getting longer with duplicate entries.
-Is the echo $PATH command getting these variables from more that one
place?
Yeah Im going to do some serious reading up on this.
Ive not even started down the rails path and found ive got some serious
fundamentals to learn.
Thanks for all the support; i will be back at some point!