I want to run two rails apps which have rails version 3.1.10, 4.0.2 & ruby 1.9.2, 2.1.0. Is it possible to do this using Heroku?
As long as you specify the ruby and rails version in your Gemfiles, heroku will take care of it for you. I have an app running on ruby 1.9.2 and rails 3.2.13 and another on ruby 2.0.0 and rails 4.0.3.
Yes, It is possible just make sure that the ruby versions with rails 4. It requires Ruby version 2.0.0+.
Just check the
https://devcenter.heroku.com/articles/getting-started-with-rails4
https://devcenter.heroku.com/articles/getting-started-with-rails3
for the pre requisites.
Related
Before judging this question please listen to these details:
I have tried twenty million things to "update" ruby so that it is compatible with ruby on rails. The problem is that I cannot make changes to anything in the bin of my macbook. The terminal simply does not allow it. So, I installed a new version of ruby via the command line that is 2.5.1. How do I direct rails via the terminal to use this version instead of the version in my bin?
From the official Rails Guides website.
Rails 6 requires Ruby 2.4.1 or newer.
Rails 5 requires Ruby 2.2.2 or
newer.
Rails 4 prefers Ruby 2.0 and requires 1.9.3 or newer.
Rails 3.2.x is the last branch to support Ruby 1.8.7.
Rails 3 and above require Ruby 1.8.7 or higher.
While Rails 6 is still unreleased, this is a preliminary guess, given from the current master-branch of the official repository, at https://github.com/rails/rails/blob/master/guides/source/upgrading_ruby_on_rails.md
From edge-guides:
http://edgeguides.rubyonrails.org/upgrading_ruby_on_rails.html#ruby-versions
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've got a Rails 2.3.5 app that I want to upgrade to Rails 3. In the Rails 3 upgrade Railscast, they suggest upgrading to 2.3.8 before going to 3. I've tried Googling but the information I find is all about upgrading to Rails 3. I found this question, which seems to suggest doing gem update rails and rake rails:update, but wouldn't these commands upgrade to Rails 3, as it's the latest version? How do I upgrade to Rails 2.3.8? Thanks for reading.
There's not much difference between 2.3.5 and 2.3.8 (also, 2.3.10 is the latest version on the 2.3 branch - you should upgrade to that).
Install Rails 2.3.10:
gem install rails -v=2.3.10
Then edit config/environment.rb and change your Rails version to 2.3.10 near the top of the file. Start up webrick, deal with any deprecation warnings it throws at you while you click through your app, and you're pretty much done.
Citation from the Rails blog:
"We’ve released Ruby on Rails 2.3.9
(gem and git tag) to extend the 2.3.8
bridge a few steps closer to Rails 3
and Ruby 1.9. If your app runs on
Rails 2.3.9 without deprecation
warnings, you’re looking good for an
upgrade to Rails 3."
Edit:
Jeremy is on the money. Don't install 2.3.9, it has a serious security flaw. I've updated my answer to 2.3.10.
You can run rake rails:update - this updates the stock javascripts and config files. However, they probably won't need to be changed from 2.3.5 to 2.3.10.
$ gem install rails -v 2.3.8
Then change the RAILS_VERSION in your environment.rb file and run
$ rake rails:update
I have just downloaded an app that is based on Rail 2.2.0 which is included in the app. I have just upgraded to Ruby 1.9 and I still have Ruby 1.8 on my machine. Is there a way I can tell this app to use Ruby 1.8 vice 1.9? Would it be easier to decouple the app from Rails 2.2.0 and upgrade it to Rails 2.3.6? If changing the rails would be easier, how do I do that?
You could use RVM (Ruby Version Manager) which is a command line tool which allows you to easily install, manage and work with multiple ruby environments from interpreters to sets of gems.
That way you can have a different set of gems (including Rails) under Ruby 1.8 and a different set of gems under Ruby 1.9.