This forum is no longer active. Please post your questions to our new community site

rails: command not found

Subscribe to rails: command not found 8 post(s), 3 voice(s)

 
Avatar alinuxBN 5 post(s)

I’ve been trying to get the Rubystack working on my PCLinuxOS2007 computer for a few days now – without success. At first when I chose to put it in /home/alan/ruby, it would install and I could see the Rails welcome page. Great – but no commands would work. Trying rails -v and gem -v got the response of command not found.

I checked the $PATH on the computer and it included /home/alan/. I also tried to put it in var/www/html/ruby, usr/bin/ruby and opt/ruby. Never did I get any rails command to work.

I also assigned a group called rails to have read/write permission to the ruby file and any files below it – and added myself to teh group – so there shouldn’t be any permissions problem.

Any ideas?

I checked that Apache was working. What do I need to do to get the Rails command to work?

 
Avatar Manuel 71 post(s)

Hi alinuxBN,

In order to use any RubyStack program you should load its environment variables. It is done running the script “rubyconsole”, located on the RubyStack’s install directory.

cd /home/alan/ruby
./rubyconsole

Let us know if it didn’t work for you.

cheers

 
Avatar alinuxBN 5 post(s)

Hi Manuel

I keep getting the following error despite deleting the previous incarnations of the BitNami stack AND removing MYSQL via synaptic (the PCLinuxOS2007 package manager). As you can see I’ve tried it in yet another location!

There has been an error.
Error running /usr/local/bin/rubystack-1.1-0/mysql/scripts/myscript.sh /usr/local/bin/rubystack-1.1-0/mysql dhabi2 : useradd: user mysql exists
ERROR 2002 (HY000): Can’t connect to local MySQL server through socket ’/usr/local/bin/rubystack-1.1-0/mysql/tmp/mysql.sock’ (2)
ERROR 2002 (HY000): Can’t connect to local MySQL server through socket ’/usr/local/bin/rubystack-1.1-0/mysql/tmp/mysql.sock’ (2)
ERROR 2002 (HY000): Can’t connect to local MySQL server through socket ’/usr/local/bin/rubystack-1.1-0/mysql/tmp/mysql.sock’ (2)
The application will exit now

The good news is that I could install it into that same directory in Fedora 8 and it works after using ./rubyconsole

It doesn’t solve my laptop problem though – as I can’t get Fedora 8 to install there …. only PCLinuxOS2007

 
Avatar Manuel 71 post(s)

Hi again,

There has been an error.
Error running /usr/local/bin/rubystack-1.1-0/mysql/scripts/myscript.sh /usr/local/bin/rubystack-1.1-0/mysql dhabi2 : useradd: user mysql exists
ERROR 2002 (HY000): Can’t connect to local MySQL server through socket ’/usr/local/bin/rubystack-1.1-0/mysql/tmp/mysql.sock’ (2)
ERROR 2002 (HY000): Can’t connect to local MySQL server through socket ’/usr/local/bin/rubystack-1.1-0/mysql/tmp/mysql.sock’ (2)
ERROR 2002 (HY000): Can’t connect to local MySQL server through socket ’/usr/local/bin/rubystack-1.1-0/mysql/tmp/mysql.sock’ (2)
The application will exit now

This usually means that MySQL couldn’t start for some reason. Did you get that error during the installation? If so, can you send us to manuel {at} bitnami.com a copy of the installation log? It should be located at /tmp/bitrock_*.log, but remember that the content of /tmp is deleted each time you boot your computer.

cheers

Manuel

 
Avatar alinuxBN 5 post(s)

For those viewing this topic, Manuel now has the log requested.

 
Avatar alinuxBN 5 post(s)

One more point – not sure how relevant – is that tmp isn’t deleted each time I boot my computer. I had about 6 logs I could have chosen to send. I suspect I will have to reinstall PCLinux to solve the problem. When I next get enough time, I think I’ll do just that.

 
Avatar alinuxBN 5 post(s)

I reinstalled PCLinuxOS 2007 and the stack now works. Obviously not a problem with Bitnami Manuel, but something became misconfigured on my computer.

Solved

 
Avatar antonio 621 post(s)

I’m glad to hear that it works now!