ruby - How to use a created gem for a specific rails version? -


i new ruby on rails, installed first app.

i created gem specific rails version (not specific project) - there difference?

$ rvm gemset create rails500   gemset 'rails500' created.  $ rvm 2.4.1@rails500 $ gem install rails -v 5.0.0 

then wanted use gemset create new app:

$ mkdir blog-app $ cd blog-app $ rvm gemset use rails500   using ruby-2.4.1 gemset rails500 $ rails new . 

this did not create .ruby-gemset or .ruby-version file me, did create gemfile rails 5.0.0 listed. created .ruby-gemset & .ruby-version file:

$ echo "ruby-2.4.1" > .ruby-version $ echo "rails500" > .ruby-gemset 

i trying find out if did correctly. also, need .ruby-gemset file if rails5.0.0 listed in gemfile?

lastly, rvm , bundler. should have ran bundler install?

.ruby-gemset , .ruby-version not created automatically rails 5.0.0 generator. you're doing looks ok.

.ruby-version specifies version of ruby you'd use. can use rvm, rbenv or chruby specify version of ruby want use in application.

.ruby-gemset specific using rvm. it's alternative using bundler. both bundler , rvm gemsets accomplish goal of maintaining independent list of application dependencies ("gems") separate system gems. before bundler , rvm gemsets, ruby didn't have solution having separate dependencies per project.

don't use rvm gemsets , bundler interchangeably. recommend getting totally comfortable using 1 or other, not both on same project. (i should note i'm not versed on gemsets of information may out-of-date. correct me if i've said inaccurate.)


Comments

Popular posts from this blog

neo4j - finding mutual friends in a cypher statement starting with three or more persons -

php - How to remove letter in front of the word laravel -

minify - Minimizing css files -