Problem with upgrading to Rails 4.2.2
Hope that someone here can help. I just got an old mac back and bumped it up to OSX 10.10.3 (was on snow leopard). Did a whole reinstall for homebrew, rbenv (was rvm), ruby (2.2.2), rails (4.2.2), postgres etc following the guide on "Setup Rails".
Was trying to get back to revive a project neglected for over a month which was on rails 2.4.0. The problem is trying to update the rails version to 4.2.2. The gemfile.lock won't let me upgrade by bundle install and bundle upgrade rails keeps throwing this error:
Could not find gem 'rails (= 4.2.2) ruby' in any of the gem sources listed in your Gemfile or installed on this machine.
Tried un update to 4.2.1 and it worked perfect. Any ideas how can I work around this? Would it be ok the directly edit the gemfile.lock?
Thanks in advance.
Try installing rails separately and bundle again. ( Remove Gemfile.lock if problem persist and bundle )
Hey Siddharth thanks for the reply.
Yea tried that already but it comes up with this error:
ERROR: While executing gem ... (Errno::EACCES)
Permission denied @ rb_sysopen - /Users/ariffmunshi/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/rails-4.2.1/README.md
chmod +x /usr/local
Check this http://stackoverflow.com/questions/18320621/gem-install-rails-error-while-executing-gem-errnoeacces
The chmod should work. Out of curiosity were you trying to install the Rails gem as sudo or just as yourself? Sometimes these things matter although you should be able to install Rails in userspace without having to use sudo for global installation.
I haven't touched 4.2.2 is that even a release yet? I thought 4.2.1 was the latest version as of 3/19/15 per Tenderlove.
This was the last release note from the core team. Unless you're on a branch that hasn't been put into production yet. Rails Release
oh man! @James you're right. I think I must have got mixed up with the version.. installing too many things today. Yup it should be 4.2.1 and not 4.2.2. Just checked the setup guide and 4.2.1 is recommended. Wonder how I saw 4.2.2.
All is good now. Thanks for all the input guys!
Sweet! I love when problems turn out not to be problems after all. Happy hacking!
Btw, if you add the following to your Gemfile it should take care of installing the latest version for you.
gem 'rails', "~> 4.2.1"
Haha! I was reading the title and was like hmm, I don't think I've upgraded to Rails 4.2.2 yet either. ;)