Link to home
Start Free TrialLog in
Avatar of mikha
mikhaFlag for United States of America

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 ?
Avatar of Brandon Lyon
Brandon Lyon

That sounds right to me.

  • What are the specific errors you're running into when starting the server?
  • Did you define the system path variables?

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.
Avatar of mikha

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/Workspace/Ruby/firstApp/bin/sprint: 15:in '<top (required)>'
             76: from /users/newa/Documents/Workspace/Ruby/firstApp/bin/sprint: 15:in 'require'
             75: from /users/newa/.rvm/gems/ruby-2.6.5/gems/spring-2.1.0/lib/spring/binstup.rb: 11:in '<top (required)>'
             74: from /users/newa/.rvm/gems/ruby-2.6.5/gems/spring-2.1.0/lib/spring/binstup.rb: 11:in 'load'
             73: from /users/newa/.rvm/gems/ruby-2.6.5/gems/spring-2.1.0/bin/spring: 49:in '<top (required)>'
             72: from /users/newa/.rvm/gems/ruby-2.6.5/gems/spring-2.1.0/lib/spring/client.rb: 30:in 'run>'
...
...
This question needs an answer!
Become an EE member today
7 DAY FREE TRIAL
Members 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.