The Program 'Rails' Can Be Found in the Following Packages - Issue with Some App and Rvm

The program 'rails' can be found in the following packages - issue with some app and RVM?

Not really sure what exactly your problem is. If you use rvm and have installed Rails with it, you may have to use

rvm use 1.9.3

(version number may depend on your installation). Then you may or may have not a gemset with this. So:

bundle install

should install Rails gem in this gemset. Maybe use

rvmsudo bundle install

or just manually install the Rails gem. But this would partially depend on the Rails version expected by the app. There are other options, but this should mostly work.

For setting a version permanently you can use:

rvm use 1.9.3 --default

For this to work you must have something like this:

[[ -s "$HOME/.rvm/scripts/rvm" ]] && . "$HOME/.rvm/scripts/rvm"

in your ~/.bash_profile.

In addition you can have something like a .rvm folder in your project where you can set rvm options on a project level if you need to switch between versins often (didn't use this myself, but there should be docs on the rvm homepage)

Getting rails version on production with RVM

You can check in Gemfile.lock to see which version of Rails your app is using.

Ruby on Rails RVM $PATH issue

Seems like your rvm has not been added to PATH properly (or it was broken).

Add this line to your profile settings (.bashrc or .bash_profile)

[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" # Load RVM into a shell session *as a function*

and source the file:

source ~/.bashrc  

or

source ~/.bash_profile

Edit: You seem to have added the echo line to .bashrc by mistake, it should be executed in terminal.

I am having an issue with ruby and rails?

I faced the same problem after a fresh install of my OS, selecting Run command as a login shell in my terminal solved the problem.

Terminal > 
Edit >
Profile Preference >
Title and Command >
(Check) **Run command as a login shell**
Restart Terminal

Rails not recognizing commands

You need to install the gems in your gemfile, using bundler. From the root of your app, type bundle. Next, run your commands using bundler, like bundle exec rails c or bundle exec rails s.

I do not have access to the rails command in my application folder

Maybe you don't have rails gem installed in your gemset.

Try out gem install rails, after using the specific gemset.

source ~/.rvm/source/rvm

I guess you missed to read instructions from installer and rvm commands, follow this simple instruction https://rvm.io/integration/gnome-terminal/ - it might be a bit different for your default terminal emulator.



Related Topics



Leave a reply



Submit