I just ran an Update on my Snow Leopard and today when I tried to run Rails server I got the following:
Rails is not currently installed on this system. To get the latest
version, simply type:
$ sudo gem install rails
On Echo $PATH I get following:
/opt/local/bin:/opt/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/local/git/bin:/usr/X11/bin
Update
Running the command giving above for installing rails did not do any harm. I guess updating process removed previous links of rails. the latest version of Rails and dependencies got installed and things working perfect
Try this command
which rails
and see if rails is installed. If it is, add it to your executable path
Related
I have just set up ruby and rails on a freshly installed freeBSD. It works great. I can do rails new blabla mv into blabla and do rails s and it just works.
I had an up and running rails app on another computer. I copied the repertory that contained the app to the new computer running freeBSD. However, when I mv into that repertory of the rails app and to rails server I get -bash: rails: command not found
I have tried creating a new app with the same name and let rails create all the repertories and then copy the files of the existing rails app therein but no success.
I can run rails -v and rails s from within any repertory and get correct answer, but when I move into that specific repertory I get that command not found.
You're probably using a ruby version manager I suspect (rbenv/rvm)? Check the ruby version in your Gemfile (top of the file). It probably isn't the same as the ruby version you have installed. If you're using one of the above mentioned version managers than install the correct ruby for your rails project. After that you can do a gem install bundler in the project directory and after run bundle install which will install rails and all dependencies.
Which version you are using? It happens with earlier versions. Try updating your gems and bundler. And try again. Hope it helps.
Did you try running bin/rails s? I think tha you need run bundle install too.
I just installed ruby and rails. When i run 'ruby -v' command it shows version of ruby that's currently installed. Similarly, I need to check the version of rails as well. Since rails was installed using RVM, the 'rails -v' command is not working. When i run the 'gem list rails' command, it shows two versions of rails. But when i try 'which rails' command, nothing happens. Please help find the version of rails installed.
Have you tried to run this into your console:
$ rails --version
Can't test from here but I'm pretty sure it was --version with rails.
If you want to know which version a specific app is running, you can simply open Gemfile and see. Should be one of the first lines.
I recently upgraded to Lion and I am trying to install Rails. I used RubyGems to install rails and each time I tried to start a new rails project I would get an error saying, "Method 'list ' was not found".
So I unistalled Rails using RubyGems. I noticed I had two versions installed. I uninstalled both. I then ran 'gem clean'. Once again I installed Rails but now when I attempt to create a new rails application it's as if rails is not installed.
rails: command not found
I have the new Xcode command line tools installed. Can anyone help a brother out?
I believe my issue is due to the fact RubyGem does not add 'rails' to the $PATH environment variable. I was able to get everything working by installing RVM and using it to update my default Ruby and install Rails
Got a new machine and ported settings and files over. Went to update to Rails 3.2 and now I'm getting a list of installed gems when I run "gem list" but when I run the rails command, it tells me: Rails isn't installed.
I'm running OS X Lion and Rails 3.2. I've tried editing the path and creating a symlink and nothing seems to work. I'd be grateful for any help!
Try this tutorial and install Ruby Version Manager. It's got all the steps I followed to get ruby working on my mac.
http://seanbehan.com/mac-os-x/installing-and-using-rvm-on-mac-os-x-creating-gemsets-and-reverting-to-original-environment/
I am trying upgrade Rails. I am pretty sure that Rails 3.1 is now installed, however my rails apps still have no Gemfile, and rails -v returns 2.3.5. When I type "gem uninstall rails" I get:
aheine#ubuntu:~/www$ gem uninstall rails
Select gem to uninstall:
1. rails-3.0.9
2. rails-3.1.0.rc1
3. rails-3.1.0.rc5
4. All versions
How can I get rid of Rails 2, and make rails 3 the default version to use?
I am using Ubuntu 11.04
Your running with the system provided Rails, run apt-get remove rails and then you may need to make a configuration change so the system can find the proper rails command. So see if that works and then try running rails -v if that returns command not found add this line to the beginning of your .bashrc file in your home directory.
export PATH=/var/lib/gems/1.8/bin:$PATH
After that's done open a new shell and try running rails -v again.