The Program 'Rails' Is Currently Not Installed

The program 'rails' is currently not installed?

How did you install rubygems? I've found problems when using it through the ubuntu repositories in the past. Usually I remove that package and compile and install

sudo apt-get remove rubygems
wget http://rubyforge.org/frs/download.php/70696/rubygems-1.3.7.tgz
tar xzvf rubygems-1.3.7.tgz
cd rubygems-1.3.7/
sudo ruby setup.rb
sudo ln -s /usr/bin/gem1.8 /usr/bin/gem

or you may just have to symbolic link it:

sudo ln -s /usr/bin/gem1.8 /usr/bin/gem

The program 'bundle' is currently not installed

First Set up the PATH variable for the installed ruby executable(Suppose the installed ruby is ruby-2.0.0-p451):

PATH=$PATH:$HOME/.rvm/gems/ruby-2.0.0-p451/bin

and then run,

gem install bundler (if bundler is not installed)

and lastly run,

rvm use ruby-2.0.0-p451 --default (--default is optional).

There you go. Now you would be able to run bundle command with out any issues.

Hope it helps :)

Error ('The program 'rails' is currently not installed.') creating rails3 application using RVM

no no, no rvmsudo.

rvm pkg install zlib && rvm install 1.9.2 (so it builds against that zlib that rvm installed) && rvm --create use 1.9.2@rails31 (to create a rails31 gemset and use it all on one go)

NOTE: use rvm install 1.9.2 if you used that to install originally. the -p290 shows up because it is a result of the fact that the ruby project has 290 as the official release and rvm picks up on that. This way with 1.9.2 and not 1.9.2-p290 when 1.9.2 series is jumped, rvm will pick up on that and install that instead. Otherwise if you originally did 'rvm install 1.9.2-p290' then do that instead.

As for the rails command. If you executed the above commands then you have been moved into the right rvm controlled ruby and gemset. If not then execute that command now (rvm --create use 1.9.2@rails31)

NOW you can execute gem install rails -v='3.1.0' (I added the version just in case rails changes before you see this)

This will install the rails gem and its deps into Ruby 1.9.2-p290's rails31 gemset. Now you can execute rails new test_app to test it. (I usually mkdir -p $HOME/tmp && cd $HOME/tmp && rails new test_app)

This should eliminate your problems.

Installed Rails but the rails command says it's not installed

As others say, this may very well be a PATH variable issue on your bashrc/bash_profile file.

You can learn how to change PATH..

You can get the current PATH variable by typing echo $PATH

Using RVM on Ubuntu 12.04 to use Rails. The program 'rails' is currently not installed

You need to type source ~/.rvm/scripts/rvm before attempting to use Rails.

I believe the RVM installation suggests putting this line (or something similar) in your .bashrc.

Run the following command in Terminal:

echo "source \$HOME/.rvm/scripts/rvm" >> ~/.bashrc

This appends the line source \$HOME/.rvm/scripts/rvm to the end of the .bashrc file.

Doing so ensures that RVM is properly loaded each time you open up a terminal.

The program 'ruby' is currently not installed error after reboot

dpkg will be checking in a database that it maintains, whereas trying to execute ruby uses the PATH. If I recall correctly, Ubuntu has a bash handler configured to execute when any command is unresolvable; it seems that it just displays that generic message rather than checking with dpkg first.

It is possible that ruby has disappeared from your filesystem (or at least the directory it previously resided in), or that your PATH was changed.

What do you get if you execute "which ruby" and "where ruby"?

Lastly, Ubuntu can complain that a program cannot be found when it is present. This occurs when running a 64-bit version of Ubuntu, without the necessary x86 libraries installed, and trying to execute a 32-bit binary. However, I recall the error message being more along the lines of "file not found".

Rails command not available after installing with gemfile

So, I was running rbenv rehash and setting the environment variable. However, the new env variables were not available until after a restart. Using the full path to /.rbenv/shims/rake solved the problem.

rvm' is currently not installed. (Works on one terminal but not the other)

Trying sourcing your bash profile.

source ~/.bashrc 

Or

source ~/.bash_profile

Also: . ~/.bash_profile works.

This runs your bash profile in your current context (your current shell process) and sets the environment variables so they remain in this context. This is different from executing the .bash_profile like this: ./.bash_profile which will create a new shell, execute the commands there and thus not affect your current shell process.



Related Topics



Leave a reply



Submit