downgrade to rails 2.3 from 3.1.1[how to] - ruby-on-rails

I need to install redmine1.4 for that need to have my rails version2.3, but I have rails3 .
How can I downgrade my rails version -> Rails 2.3.14. Thanks

I not sure I get the question. From what I understand you want to install Redmine which requires rails 2.3.x but you have rails 3 gem installed. I'm not familar with redmine but I think it should use bundler and simple bundle install should do the trick.
If not, the simplest solution would be to uninstall rails 3 gem and install rails 2.3.x gem. For that you need to:
$ gem uninstall rails
$ gem install rails --version "2.3.14"
However this may broke your other apps which use rails 3.x ver. Thus I recommend using one of following tools for managing ruby versions and use feature called gemsets:
RVM
rbenv

Related

ActionCable without upgrading to Rails 5 beta

I currently have a Rails app running on 4.2.5, and I want to use ActionCable without having to upgrade the whole thing to the Rails 5.0.0.beta3 version and risk breaking all of the other gems.
Following guides I've seen on the internet, I've tried
gem 'actioncable', github: 'rails/actioncable'
which doesn't work because the ActionCable repo has been merged into the Rails repo. I even tried
gem 'actioncable', github: 'rails/rails'
but this doesn't seem to work of the re-numbering of the versions that happened when ActionCable merged into Rails. (The only version below 5.0.0.beta* is the 0.0.0, which seems to be an empty gem.)
I also tried setting the source to rubygems.org in hopes of finding an older pre-merged version, but was unsuccessful.
What can I do to integrate ActionCable into my 4.2.5 project without upgrading to Rails 5?
Conversely, when could we anticipate the first stable release of Rails 5? :)
You can have both GemSets, so you can use rails 4 and rails 5 whenever you want.
First, update the ruby gem manager by $ gem update --system, install Nokogiri if you haven't $ gem install nokogiri.
Now lets set your rails 4 GemSet (you might have to update ruby, it will tell you if you need to)
$ rvm use ruby-2.3.0#rails4.2 --create
$ gem install rails --version=4.2.5
$ rails -v
your rails version should be 4.2.5 at this point.
Now lets set your rails 5 GemSet
$ rvm use ruby-2.3.0#rails5.0 --create
$ gem install rails --pre
$ rails -v
your rails version should be 5 beta3 at this point.
We are done, now you only need to change between GemSets, depending on your needs, by doing this.
for rails 4 use = $ rvm use ruby-2.3.0#rails4.2
for rails 5 use = $ rvm use ruby-2.3.0#rails5.0
Now, you can use and experiment rails 5 without risking your rails 4 gems and stuff.
You can do exactly the same for other Rails versions if you want.
I have same issue,But i solved.just check this
Just try your rails console
check your rails version rails -v
may be rails (4.2.7.1)
Then you need to check gem list, i mean gem list -l
Now you can see your all gem with versions.
Then you need to instsll gem install rails -v 5.0.0beta2
once installed rails check gem list, gem list -l
Then you can see rails (5.0.0.rc2, 5.0.0.beta2, 4.2.7.1)
You successfully installed rails 5.0.0
Then you do bundle update
Update all gem and supporting rails 5.0.0,this is work for me just try this.

Installing Rails 2.3.4

I am working on a project that requires me to install Rails 2.3.4. I have only worked with Rails 3 applications, where I installed Rails 3 using RVM.
Since I am using a separate machine for this project, basically all I am asking for is how to install Rails 2.3.4. Any links would be much appreciated :)
did you try
sudo gem install rails -v=2.3.4
RVM http://beginrescueend.com/rvm/install/ is your best bet.
Which OS are you working with ?
The installation guide is for Linux. I don't have much experience with RVM on windows. But should be straightforward.
With RVM you get create gemsets which will give you advantage that you can run different rails version for different applications.
http://beginrescueend.com/gemsets/
gem install rails -v 2.3.4
gem install --help for more information.
There is no reason why the above can not be executed via rvm.
gem install -v=2.3.4 rails
or
sudo gem install -v=2.3.4 rails
It will install rails 2.3.4 version.

How to install AuthLogic plugin for rails 2.3.5?

I am following a Ruby on Rails tutorial in a book that uses Acts As Authenticated, but this seems to no longer be supported. I was searching and came across a SO post which recommends a couple of different alternatives for doing user authentication in rails applications. I think AuthLogic looks like a good choice. I am using Rails 2.3.5 and Ruby 1.8.7.
The AuthLogic readme section states the following:
** Please note the latest version is compatible with rails 3 only. Rails 2
should use version 2.X.X **
However, when scrolling down to the section about installing as gem or plugin, it only gives the following examples:
Rails 3:
$ sudo gem install authlogic
Rails 2:
$ sudo gem install authlogic
--version=2.1.6
Or install as a plugin:
script/plugin install
git://github.com/binarylogic/authlogic.git
I want to install a plugin, rather than the gem, but I need to do it for 2.3.5, not for 3. Can I install the plugin by version in the same way that it shows how to install the gem by version? For example:
script/plugin install git://github.com/binarylogic/authlogic.git --version=2.3.5
If this is not how it is done, could someone please explain to me how to do it?
Thanks!
I really would reconsider using as a plugin and instead setup bundler in your project. Your Gemfile line would be gem 'authlogic', '2.1.6'. If you are concerned about packaging libraries with your project you can bundle pack to include your gems with your project.
Anyway, The following plugin install command should work.
script/plugin install git://github.com/binarylogic/authlogic.git -r 'tag v2.1.6'
Installing rails 2.3.5
Create the gemset:rvm gemset create rails2
2.Setting up rvm to use always this gemset:rvm use 1.8.7#rails2 –default
Gem install rails -v 2.3.5

how to update rails 2.3.5 to rails 3.0.1 in ubuntu 10.10

recently i installed rails 2.3.5 using apt-get. After installing rails 3.0.1 the version shows on as rails 2.3.5 when i type rails -v command. How to change that? or can i update rails 2.3.5 to 3.0.1? pls help me out
You should NOT use apt to manage your rubies or your gems! (NEVER)
Use RVM to manage your Rubies and your gems : http://rvm.io/
Try gem uninstall rails then select version of rails gem which you want to remove.
You can follow the upgrade directions given at http://guides.rubyonrails.org/3_0_release_notes.html
to install Rails 3 use this script..
sudo gem install rails --pre
It's possible to control version of Rails
rails _2.3.8_ --version
rails _3.0.0.rc_ --version
Hope it'll work. For more details https://help.ubuntu.com/community/RubyOnRails#Installing_rails it's a best url
Oh, I got another solution. Try this script, it'll work
sudo gem install -v=3.0.1 rails --include-dependencies

problem with rails instalation need 2.3.8 after installation still getting "rails -v" = "Rails 2.3.5"

I'm trying to setup clockingit but...
even after
gem install -v=2.3.8 rails
1 gem installed
i'm getting
rails -v
Rails 2.3.5
I need 2.3.8 to rake the gems for clockingit
help greatly apreciated
Try gem install -v 2.3.8 rails (no equal sign). You should also check if the version of Ruby on Rails installed through RubyGems is used at all. Maybe a version of Ruby on Rails installed through the package management of your operating system overlaps the version installed through RubyGems.
Try to use rvm. It is dead simple to deal with, and makes managing gems very easy. If you already on rvm, try to create another gemset
rvm gemset create new_gemset
and the try to install rails

Resources