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
How to Reference a Method in Another Ruby Code File
How to Add "Somewhere" a 'Before(:Each)' Hook So That All Spec File Can Run It
Implementing a Synchronization Barrier in Ruby
Need to Use Add_Index on Migration for Belongs_To/Has_Many Relationship? (Rails 3.2, Active Record)
Upgraded to Ruby 1.9.2 and Getting Segmentation Fault Errors in Nokogiri
Why Is Ruby String.Hash Inconsistent Across MAChines
No Implicit Conversion from Nil to Integer - When Trying to Add Anything to Array
What's the Purpose of Tainting Ruby Objects
How to Interleave Arrays of Different Length in Ruby
Running Heroku Console Does Not Start
Actioncable - Failed to Upgrade to Websocket in Production
Access Ruby Hash Using Dotted Path Key String
Ruby on Rails: How to Use Oauth2::Accesstoken.Post
How to Get the Number of Elements Having Same Attribute in HTML in Watir
Ruby Map Method Syntax Question
Why Is Uri.Escape() Marked as Obsolete and Where Is This Regexp::Unsafe Constant
Rvm Error While Running Make Install. Error Comes While Installing Power_Assert Gem