mikha
asked on
how to set up and use RVM.
I'm setting up Mac for ruby and rails development. here are the steps I took
installed RVM
installed Ruby (version 2.6.5)
created gemset
rvm use ruby-2.6.5@gemset
gem install rails (version 6.0.2)
rails new todoApp
gem install bundler
bundle install
rails server - i ran into issue with starting a server.
I'm not sure if I did the things in order, but wanted to know how should i set up the ruby project.
first -> install ruby or set the version of ruby desired using rvm
then create gemset
then install rails, bundler
then run rails server.
are these the normal steps to take ?
installed RVM
installed Ruby (version 2.6.5)
created gemset
rvm use ruby-2.6.5@gemset
gem install rails (version 6.0.2)
rails new todoApp
gem install bundler
bundle install
rails server - i ran into issue with starting a server.
I'm not sure if I did the things in order, but wanted to know how should i set up the ruby project.
first -> install ruby or set the version of ruby desired using rvm
then create gemset
then install rails, bundler
then run rails server.
are these the normal steps to take ?
ASKER
@Brandon - thanks for your comment and sorry for the late reply. I tried few other things but still couldn't get pass this error.
I had installed newer version of Ruby other than what comes with Mac os.
so I get following results for the commands :
ruby -v => Ruby 2.6.5
rails -v => Rails 6.0.2
and I run into the following error when I try to run => rails server command
=> Booting Puma
=> Rails 6.0.2 application starting in development
=> Run 'rails server -- help' for more startup options
Exiting
(most recent call last) :
79 : from bin/rails: 3:in '<main>'
78: from bin/rails: 3:in 'load'
77: from /users/newa/Documents/Work space/Ruby /firstApp/ bin/sprint : 15:in '<top (required)>'
76: from /users/newa/Documents/Work space/Ruby /firstApp/ bin/sprint : 15:in 'require'
75: from /users/newa/.rvm/gems/ruby -2.6.5/gem s/spring-2 .1.0/lib/s pring/bins tup.rb: 11:in '<top (required)>'
74: from /users/newa/.rvm/gems/ruby -2.6.5/gem s/spring-2 .1.0/lib/s pring/bins tup.rb: 11:in 'load'
73: from /users/newa/.rvm/gems/ruby -2.6.5/gem s/spring-2 .1.0/bin/s pring: 49:in '<top (required)>'
72: from /users/newa/.rvm/gems/ruby -2.6.5/gem s/spring-2 .1.0/lib/s pring/clie nt.rb: 30:in 'run>'
...
...
I had installed newer version of Ruby other than what comes with Mac os.
so I get following results for the commands :
ruby -v => Ruby 2.6.5
rails -v => Rails 6.0.2
and I run into the following error when I try to run => rails server command
=> Booting Puma
=> Rails 6.0.2 application starting in development
=> Run 'rails server -- help' for more startup options
Exiting
(most recent call last) :
79 : from bin/rails: 3:in '<main>'
78: from bin/rails: 3:in 'load'
77: from /users/newa/Documents/Work
76: from /users/newa/Documents/Work
75: from /users/newa/.rvm/gems/ruby
74: from /users/newa/.rvm/gems/ruby
73: from /users/newa/.rvm/gems/ruby
72: from /users/newa/.rvm/gems/ruby
...
...
This question needs an answer!
Become an EE member today
7 DAY FREE TRIALMembers can start a 7-Day Free trial then enjoy unlimited access to the platform.
View membership options
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Mac OS presents an extra layer of difficulty because it ships with an outdated version of Ruby pre-installed. Whatever you're trying to run might be using the system version of Ruby instead of the one you've installed.