# Rails etc - Command not found

**URL:** <https://www.ruby-forum.com/t/rails-etc-command-not-found/204934>\
**Category:** Deployment\
**Created:** [March 25, 2011, 6:18am UTC](https://www.ruby-forum.com/t/rails-etc-command-not-found/204934 "2011-03-25T06:18:18Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![luislavena](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/0ea827/32.png) [@luislavena](https://www.ruby-forum.com/u/luislavena)\
**Post date:** [March 25, 2011, 6:18am UTC](https://www.ruby-forum.com/t/rails-etc-command-not-found/204934/1 "2011-03-25T06:18:18Z")

</div>

Hello everyone. I am getting the following error, and would be grateful  
if someone could help me with this:

~ # gem list | grep rails  
factory\_girl\_rails (1.0.1, 1.0)  
rails (3.0.5, 3.0.3)  
rspec-rails (2.5.0, 2.0.1)  
: ~ # rails-v  
-bash: rails: command not found

My system:

: ~ # ruby-v  
ruby 1.9.2p180 (02/18/2011 revision 30909) [i686-linux]  
~ # gem-v  
1.6.2  
~ # rvm ruby ​​rails-v  
Rails 3.0.5

The system also was not finding the ruby, rake, and irb gem, but I  
solved this by creating a symbolic link  
/usr/local/rvm/gems/ruby-1.9.2-p180/bin from /usr/local/bin.

The rest of the gems system finds only (and work) if I use:

~ # rvm ruby ​​rails-v  
Rails 3.0.5

~# rvm ruby bundle -v  
Bundler version 1.0.10

The gem environment:

~ # gem environment  
RubyGems Environment:

- RubyGems VERSION: 1.6.2
- RUBY VERSION: 1.9.2 (18/02/2011 patchlevel 180) [i686-linux]
- INSTALLATION DIRECTORY: / usr/local/rvm/gems/ruby-1.9.2-p180
- RUBY executable: / usr/local/rvm/rubies/ruby-1.9.2-p180/bin/ruby
- EXECUTABLES DIRECTORY: / usr/local/rvm/gems/ruby-1.9.2-p180/bin
- RubyGems PLATFORMS:
  - Ruby
  - X86-linux

- GEM PATHS:
  - / Usr/local/rvm/gems/ruby-1.9.2-p180
  - / Usr/local/rvm/gems/ruby-1.9.2-p180 @ global

- GEM CONFIGURATION:  
-: Update\_sources =\> true  
-: Verbose =\> true  
-: Benchmark =\> false  
-: Backtrace =\> false  
-: Bulk\_threshold =\> 1000
- REMOTE SOURCES:
  - [Http://rubygems.org/](Http://rubygems.org/)

I tried to create a symbolic link to the rails, etc, but then the error  
that appears is another:

#~/usr/local/bin# ln -s /usr/local/rvm/gems/ruby-1.9.2-p180/bin/rails

And after restarting the console:

~ # rails-v  
/usr/local/rvm/rubies/ruby-1.9.2-p180/lib/ruby/site\_ruby/1.9.1/rubygems.rb:  
900: in `report_activate_error ': Could not find RubyGem rails (> = 0) (Gem :: LoadError) from / usr/local/rvm/rubies/ruby-1.9.2-p180/lib/ruby/site_ruby/1.9.1/rubygems.rb: 248: in `activate ’  
from /  
usr/local/rvm/rubies/ruby-1.9.2-p180/lib/ruby/site\_ruby/1.9.1/rubygems.rb:  
1276: in `gem ' from / usr / local / bin / rails: 18: in ` ’

I’ve been researching on google and followed some instructions to  
indicate the path, but nothing worked …

Any ideas?

Thanks in advance.

Gustavo

---

<div class="post-metadata">

**Author:** ![rtzgus](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/97f17d/32.png) [@rtzgus](https://www.ruby-forum.com/u/rtzgus)\
**Post date:** [March 25, 2011, 6:36pm UTC](https://www.ruby-forum.com/t/rails-etc-command-not-found/204934/2 "2011-03-25T18:36:34Z")

</div>

update:

~rvm --default 1.9.2

fix for rails (with simboly link), but bundle not found stil… i use

~ rvm ruby budle install

and ok, but i think it will still give me problems in the application…  
that will have to create symbolic links to all the gems? ☹
