Reputation: 1
I am encountering a very weird issue trying to get rails working on my system. Every time I try to run rails after installing it says I need to install. If someone could point me in the right path or give me some tips on how to further troubleshoot it would be greatly appreciated.
Thank you very much
$ rails Rails is not currently installed on this system. To get the latest version, simply type:
$ sudo gem install rails
You can then rerun your "rails" command.
$ sudo gem install rails
Fetching: rails-4.0.2.gem (100%)
Successfully installed rails-4.0.2
Parsing documentation for rails-4.0.2
Installing ri documentation for rails-4.0.2
Done installing documentation for rails after 436 seconds
1 gem installed
$ which rails
/usr/local/bin/rails
$ gem list
*** LOCAL GEMS ***
actionmailer (4.0.2)
actionpack (4.0.2)
activemodel (4.0.2)
activerecord (4.0.2)
activerecord-deprecated_finders (1.0.3)
activesupport (4.0.2)
arel (4.0.1)
atomic (1.1.14)
bigdecimal (1.2.3)
builder (3.1.4)
bundler (1.5.2)
erubis (2.7.0)
hike (1.2.3)
i18n (0.6.9)
io-console (0.4.2)
json (1.8.1)
mail (2.5.4)
mime-types (1.25.1)
minitest (4.7.5)
multi_json (1.8.4)
polyglot (0.3.3)
psych (2.0.2)
rack (1.5.2)
rack-test (0.6.2)
**rails (4.0.2)**
railties (4.0.2)
rake (10.1.0)
rdoc (4.1.0)
sprockets (2.10.1)
sprockets-rails (2.0.1)
test-unit (2.1.0.0)
thor (0.18.1)
thread_safe (0.1.3)
tilt (1.4.1)
treetop (1.4.15)
tzinfo (0.3.38)
$ rails -v
Rails is not currently installed on this system. To get the latest version, simply type:
$ sudo gem install rails
You can then rerun your "rails" command.
Upvotes: 0
Views: 139
Reputation: 2236
Rails is here:
$ which rails
/usr/local/bin/rails
But calling rails doesn't work:
$ rails -v
Rails is not currently installed on this system.
That means bash doesn't have its path in your PATH
variable.
To add it (assuming you're on a mac), issue
$ echo 'export PATH='/usr/local/bin:$PATH'" >> ~/.bash_profile
Then reload with
$ source ~/.bash_profile
And see if it recognizes the rails
command then.
Upvotes: 1