0

I'm running Ruby 2.3.0 and the project was built using 2.1.5 When I run the command
"$ rails server"
I'm given a result of
edited

or if I change the gemfile manually to 2.3.0
after changing

I've tried
"bundle install"
but it doesn't work either, I can fix the latter problem with
"gem install XYZ -v 'version of XYZ needed'"
but there're too many gems to install manually.

I understand that this may be a ridiculously simple question and I'm really sorry but I've tried my best with finding a solution to no avail.

Chun Yin
  • 290
  • 3
  • 13
  • `Gemfile.lock` is keeping your project at old versions, so that it wouldn't break if some libraries update incompatibly with your code. If you want to update your code, you might want to consider [deleting it](http://stackoverflow.com/questions/14286872/understanding-gemfile-lock-is-it-okay-to-delete-gemfile-lock-then-run-bundle-in) to install all dependencies anew. – Amadan Apr 21 '16 at 01:31
  • I've tried deleting gemfile.lock but there seems to be new problems now: http://i.imgur.com/5iCiItN.png when I run bundle install and http://i.imgur.com/5zEnzKK.png when I try rails server or any rails command. – Chun Yin Apr 21 '16 at 06:27

1 Answers1

2

You need to install proper ruby version. Easiest way to do it is using rvm.

Then, with the right ruby version selected (rvm use ruby-2.1.5) you should run bundle install and then bundle exec rails server.

quarterdome
  • 1,559
  • 2
  • 12
  • 15