How to install Rails 4.0? - ruby-on-rails

I'm on a Windows 7 computer, I'm the admin. I keep searching for a guide or tutorial to help, but nothing has popped up.
I installed Ruby 2.0 on my computer last night, then realized that 4.0 has come. Do I need to uninstall it for Rails to work? I'm relatively new to this and am confused. Any links to anything would surely help.
Thank you all in advance.

Ruby 2.0 is the most recent version of Ruby, a programming language. Rails 4.0 is the most recent version of Rails, a web app framework for Ruby which is actually designed with Ruby 2.0 in mind. You install Rails 4.0 just like every other version of Rails: gem install rails.

Related

How to upgrade from Rails 5.1 to Rails 6.0?

The title sums it up pretty much.
I want to do it via the console using the `bundler. There are several changes on the way rails has handled things such as the frontend. More details over here.
Will I have to rewrite frontend of my app again? Will it be enough to just update the bins and executables manually? Or run $ rails app:update to overwrite old stuff.
Well, it may have been a joke back when you originally posted this question, but Rails 6.0.0 is now a reality! Released Aug. 15, 2019. I would recommend running gem update rails as a first try, but "updating" to Rails 6 was not so easy for my Windows 10 system.
If you used railsinstaller.org to install Rails previously, you will not be able to install Rails 6 with it - or update - at the time of this writing. In order to update to Rails 6 you must be running ruby 2.4.4 or greater, but railsinstaller.org is limited to ruby 2.3 max. Check your version with ruby -v. I used this tutorial to do a fresh install of Ruby 2.6 and Rails 6 while updating gem to 3.0.
I would recommend installing everything fresh so you know where all of your dependencies are and how they work. It will also be much easier to update each individual component this way -- unless you opt to use tools like rvm, which by nature will be easier.
If you're having issues and want a fresh install of the latest Ruby and Rails, read the article I linked :) I only posted this answer because I know railsinstaller.org was recommended to a lot of people (like me) as an easy install method back when it was being maintained.
Latest version — Rails 5.1.5 released February 14, 2018 .
Rails 6 is NOT released !! And if it was the case bundler should make it clean
The post you linked is just a joke. Anyway, Rails 6 is under development (since January 30 I believe). Just wait.
https://github.com/rails/rails/blob/master/version.rb
Just run on your terminal:
gem update rails
That worked for me.

rails 2.3.5 upgrade to rails 5

I have a project on old framework Rails 2.3.5 & ruby 1.8.6 ,which is running on window 7 and Server mongrel.
Now i want to upgrade rails framework to rails 5 on Linux platform.
Is there any tool available for this. as manual work is too long process.
No. There is no tool to do upgrade 2.3.5 to 5. Neither can this be done in 1 step. If you don't want to rewrite from scratch or pay a 3rd party for it, assign enough time to it and start upgrading version by version.
It can be accomplished, just requires a lot of patience.

first time user to Ruby on Rails program

i'm new user here. and this is my first question regarding Ruby on Rails. so, i wanted to ask what is the correct program version of Ruby on Rails, i have seen only 2.1 and 2.2.
i was looking for 5.0 to install and use it for first time. i chose RoR (nickname for Ruby on Rails) to create a website that can have many useful features like a site would do. but i'm at loss because i have no idea where i could find a RoR 5.0 or should i just install a older package of RoR to update to 5.0?
also, i have additional questions.
1: is RoR a program that can help you make website or blog, forum? or it's just a one in all package?
2: can you actually put together a section inside a site for news information/updates?
3: where do you find or make a code for mailing list which users can have a mail updates sent to their email?
these are my questions, you see i'm quite fond of a site that is run on RoR. so i'd like to try my hand on creating a site of my own, particularly one with a forum. like any kind of development, it's fun to learn. will you answer my questions and help me learn the program of Ruby on Rails?
Ruby is a programming language which has it's own version number. Rails is a library written in Ruby which has it's own version number as well.
The version of Ruby is not the same as the version of Rails. Rails 5.x requires Ruby version 2.2.2 or higher.
You can view the versions of each by using
$ ruby --version
$ rails --version
You can use the latest stable version of Ruby. – get it from here: https://www.ruby-lang.org/en/downloads/ (The current latest stable is 2.3.1)
To get the latest version of Rails, use the gem install command. (The current latest stable version is 5.0.0.1)
$ gem install rails

Can I update to Ruby 2.1.2 using Rails 3.2.3?

First of all, I think it isn't a prohibited question on StackOverflow since it's a precise question about environment, an objective question. But if it's prohibited, please tell me.
Currently I'm developing a specific project that is using Ruby 1.9.3 and Rails 3.2.3, at the moment we can't upgrade to Rails 4 because the project dependencies.
My question is:
Using Rails 3.2.3, we can upgrade to a newest Ruby version? If so, what version: Ruby 2.0, Ruby 2.1.2 or another one?
Also, I searched on Google and StackOverflow and I don't find a question like that.
Thanks!
The first release of rails that officially support ruby 2.0 was 3.2.13 (see the announcement on the rails blog.
I deployed several applications running 3.2.15-3.2.17 and ruby 2.0 (They've since been upgraded to rails 4) without any problems that I recall.
The recently released 3.2.22 supports ruby 2.2 (announcement)
According to the Travis configuration, Rails 3.2.3 was only tested with Ruby 1.8.7, 1.9.2 and 1.9.3, so it doesn't seem to be a good idea to use a later version of Ruby (but you can always test it yourself.) However, Rails 3.2.3 has some known security vulnerabilities that have been patched in 3.2.19.
On the other hand, the configuration for Rails 3.2.19 does suggest that the developers expect it to work with Ruby 2.0.0. Your project might benefit from investing some effort to see if you can upgrade from Rails 3.2.3 to 3.2.19, and test a combination of that with Ruby 2.0 for your application, if there are new Ruby features that you need and cannot efficiently backport them. Bear in mind that the only recent answer to a similar question warns of 'weird issues' from such a combination. Also consider that the latest Rails 3.2 release notes do not mention Ruby 2.0.

Ruby versions and rails version on site5 is old

I m working on a project which was developed by another developer. Right now my job is to fix the bugs and all the necessary things. After all those things successfully done when i started to work for deployment on site5.com i got to know here that they ve not upgraded the ruby version. Still they are using ruby 1.8.7. There is a tutorial to upgrade the system to rails 3 but m not able to do that. The rails version installed on the server is 2.3.16.
When the code was given to me i bundle installed it with new version 1.9.3 and then i fixed few bugs which was a syntax error because of that syntax deprecation in 1.9.3. Now i ve asked to the client that there may be some compatibility issues if i go with the installation. Now what should i do? Should i go with the installation or suggest him some other hosting website.
since phusion 4 is stable now (allowing multiple rubies), and ruby 1.8 is considered 'legacy' by phusion developers (see their blog), doing any fixes for ruby 1.8.x seems to be a waste of time.
Changing ruby version requirements would break the application on site5, if they're really still on 1.8.x .

Resources