Really need some help with production environment installation

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:in `require'   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

Jez

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:in `require'

    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

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:

sudo gem update --system

sudo gem install gemcutter

sudo gem install jeweler

gem tumble

sudo gem install sqlite3-ruby

sudo gem install rails

Good luck,

-Conrad

Thanks Conrad I will have a go.

I found myself pointed to the Hivelogic tutorials from most places ie lynda.com & ADC.

Much Appreciated

Jez

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:in `require'   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

Any ideas now? ta

J again any help is most appreciated.

Hi, please remove the following from your path:

/usr/local/bin

/usr/local/sbin

Then open a new shell and try the commands that I specify

below.

-Conrad

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:in `require'   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

J

J,

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.

Jez wrote:

Thanks Conrad I will have a go.

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.

Much Appreciated

Jez

Best,

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:

$ which ruby /usr/local/bin/ruby

$ which gem /usr/local/bin/gem

$ ruby --version ruby 1.8.7 (2008-08-11 patchlevel 72) [i686-darwin9.7.0]

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:in `require'   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.

Regards

Jez

Jez wrote:

There's nothing currently in my path profile file (that is what you all mean?) I removed it at Conrads request.

Not quite. I think the question being asked was about the PATH environment variable, which you can see by typing

echo $PATH

at the command line. If you didn't modify it in your .profile or otherwise, it's set to some default value.

Best,

Whoa, that'll be the path then

/usr/local/mysql/bin:/usr/local/bin:/usr/local/sbin:/usr/local/mysql/ bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin

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:

$ which ruby /usr/local/bin/ruby

$ which gem /usr/local/bin/gem

$ 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.

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"

Your PATH should look like this

export PATH=/usr/local/mysql/bin:$PATH

Now, try running the commands that I sent to you previously.

-Conrad

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?

-where is the usr/X11/bin coming from?

Thanks again in advance people, Much appreciated

J

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.

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?

-where is the usr/X11/bin coming from?

Thanks again in advance people,

Much appreciated

J

I would recommend reading a book on basic unix and I wish

that the information helped.

Good luck,

-Conrad

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!