I recently upgraded to ruby 1.8.7. i'm running Rails 2.3.5 and rubyGems 1.5.2.
ever since I upgraded, every time I want to start the server, i get:
undefined local variable or method `version_requirements' for #<Rails::GemDependency:0x1022cc1c8> (NameError)
this post here advises to downgrade rugyGems to a version below 1.5.0.
downgrading doesn't seem to be the right solution..should I maybe be upgrading Ruby or Rails instead?
Also, if I upgrade to the latest ruby (1.9.2) and rails (3.0)..will my application break?
I have a very large application and can't figure out how to upgrade it without breaking the application..
That thing about version_requirements is a bug in rubygems - confirmed by their creators.
I've also participated in the bug report on the rubygems :)
gem update --system 1.5.0
performs a graceful downgrade until this is fixed.
I ran into this issue with some Rails 2.x applications and once also with 3.0.4 application, but with different error message, again, downgrading rubygems solved it.
You should use RVM so you can have both, 1.8 and 1.9.2 Ruby versions, running and you can be working with rails 2.3.x and rails 3.x the way that you want
Related
I'm configuring my first VPS for my first ruby on rails app that I´m soon deploying to the web.
I'm following this documentation https://gorails.com/deploy/ubuntu/16.04
it is going greate, but I just realised that my version of Ruby is ruby 2.2.3p173 (2015-08-18 revision 51636) [x86_64-darwin15] and the recommended for the setup is ruby version 2.3.1.
So do I have to update the ruby version on my computer to 2.3.1 or is it ok to deploy an app build on ruby 2.2.3 to an server running version 2.3.1.
This might be a stupid question, but I just want to be sure because I lack experience and I´m setting up VPS for the first time.
p.s
The App soon to deployed is built in rails 4.2.5
It is totally fine if you use Ruby 2.2.3 in this circumstance because there's not much difference between Ruby 2.2.3 and 2.3.1, they are all minor versions of Ruby 2.0.0. In addition, Rails 4.2.5 works normally with both of them.
hi I have one application in ruby but in that application developed in ruby 1.8.7, now I am using ruby 1.9.2 any possibility to change my application 1.8.2 to 1.9.2 or 1.9.3
Hope this tutorial is helpful to start working on upgrading your application to Ruby-1.9.3
He explained nicely how to upgrade from Ruby-1.8.7 to Ruby-1.9.3
Given that your rails app is using day-to-day ruby functions, upgrading to ruby 1.9 should not be an issue, however read this major changes note, from ruby 1.8 to 1.9.x and see if you are using any methods that are mentioned there. But practically in most cases your rails app should run without any modifications.
And when you are installing ruby1.9.x use RVM (Ruby Version Manager) , to have your both ruby 1.8.7 and 1.9 versions side-by-side.
and if you have a good test suite, this should not be a problem at all :)
best of luck
i get this passenger error.
Full error page: https://dl.dropbox.com/u/1725428/stackoverflow/Mongoid-Errors-InvalidDatabase.html
My setup is:
- Mac OSX Lion
- rvm ruby v1.9.3p194
- passenger
- mongodb local server
- rails 3.1.1
- mongoid 2.4.10
This setup worked well, until i tried changing a Rails version in Gemfile from 3.1.1 to 3.2. Then it broke up with "Database should be a Mongo::DB, not String. (Mongoid::Errors::InvalidDatabase)"
Tried to use previous rails 3.1.1., but the error persisted.
Tried to reinstall rvm and all the gems. But this still occur.
Tried to use the latest mongoid instead of previous working 2.4.5, not helping though.
Database server is running.
Any ideas on what could cause this?
Okay, so it was bug in the mongoid gem, i used the current 3.0rc right from github and it is working.
https://github.com/mongoid/mongoid.git
I have been able to successfully upgraded from 3.0.1 to 3.0.6 by editing the Gemfile and bundle update...
I like the fact that if something goes wrong I can revert back to the version 3.0.1
Is is also possible to upgrade to rails 3.1.1 just using bundle and go back to 3.0.6 if something does not work in the rails version?
Bundler just point your app to the right libraries (and, of course download all dependencies!).
Your app needs to fit the proper version of the libraries. So is it for Rails.
To conclude, you can't upgrade from rails 3.0.x to 3.1.x via bundler but there is a Railscast for this :)
Ruby 1.9.1 RC1 was released today so I quickly moved to install it (a test version of course using a suffix of 19). I install Rails and Rack for the 1.9 RubyGems and then create a new Rails site using edge... when I execute:
ruby19 ./script/server
I watch as the processor usage goes up to 99.8 and the terminal just sits there. Trying to run Rails 2.2 using 1.9.1RC1 gives all sorts of fail on the inflector. I was under the impression that Rails 2.2 was 1.9.1 compatible. Is anyone successfully testing Rails under Ruby 1.9.1 or are you seeing similar errors?
The same thing for me.
I'm running the latest edge rails under webrik and just see the blank screen and no response to Ctrl-C. Rails 2.2 isn't working at all.
Also, I've tried run edge under thin (with eventmachine from github fixed to build on ruby 1.9.1, except one broken ruby test - I've just added empty one with 'assert true').
After that, both webrick and thin crashes immediately with:
$ /usr/local/bin/ruby script/server
/usr/local/lib/ruby/gems/1.9.1/gems/eventmachine-0.12.3/lib/rubyeventmachine.bundle: [BUG] Bus Error
ruby 1.9.1 (2008-12-30 patchlevel-0 revision 21203) [i386-darwin9.6.0]
So, I guess, we all need calm down now. There still much work to actually run our rails apps under 1.9.1. Many gems are still at the early stages of bringing compatibility with 1.9.1
Actually, rails 2.2 is not fully compatible with ruby 1.9.1, just a basic compatibility, according to rails core team :)
Full compatibility claimed in upcoming rails 2.3.
I have written a guide on using Rails edge (near enough to 2.3) and Ruby 1.9.1. mysql, postgres and a few other gems like hpricot, thin and mongrel don't work, but the application does work.
Rails 2.2.2 is not compatible with Ruby 1.9.1rc1 when processing characters and strings on ActiveSupport. Rails uses multibyte to support unicode char-set, in other hand Ruby 1.9.1 uses built-in unicode support. Supported versions is 1.8.5 to 1.8.7.