I am using Ruby 1.9.3p2 and Rails 4.0 versions on my Linux machine.
Recently we got an maintenance project which is on versions Ruby 1.8.7 and Rails 2.3.2.
I tried of installing rvm, after that it asked to install ree. But it goes on continuously increasing packages to install.
Please tell me if there is any way without using rvm.
Using a version manager is the best way. If you don't want to use rvm, you could try using rbenv, although I prefer rvm.
Related
I git cloned an open source software and is currently planning to contribute to it. Originally I installed ruby 1.9.3 with rvm and installed gem install rails - which fetched version 4.0 (newest version)
I installed ruby 2.0 as well with rvm and did 'gem install rails' which also fetched me version 4.0
I was planning to installed ruby 1.9.3 with rails 3.2.13 - an older version of rails
to work with different software and switch between them using rvm
So since my open source software is written in 1.9.3 and rails 3.2.13, I tried
gem uninstall rails
and removed all the rails version
but when I do
rails-v ,
it is still 4.0
I figured out from another question that there are folders associated with 4.0 that I need to remove to remove 4.0, another question suggest that I install rails 3.2.13 but when I make a new app I can just do rails 3.2.13 new app etc. I installed that under 1.9.3 when I switch to 2.00 which still has 4.0, I tried rails 3.2.13 new app and it ran which I don't think it should.
I am growing semi-frustrated with this, and I wish someone can help me while I browse even more questions.
You should create a new gemset within rvm for this. That way you can use a different version of ruby and rails than your system default. Switch to ruby version 1.9.3 in RVM and then use rvm gemset create <name-here> and then rvm gemset use <name-here> to create and use the new gemset. Switch to the directory of the project you cloned and run bundle install to install all of the necessary gems, including rails (assuming the rails version is specified in the Gemfile.)
I am using windows for rails.I installed pik for maintaining different versions of ruby.
But is there any possibility to create gemsets in PIK as in RVM?If not then how can i install different versions of rails?
Please help me..Thanks in advance!!!
Pik saved my life. I've been using rails 2.3.8 at work. I wanted to try the new rails 3.1 for my personal use. They told me to install RailsInstaller. But that screwed up all my rails 2.3.8 settings. So here's what I did.
I went to rubyinstaller. Downloaded installer for versions Ruby 1.8.7-p302 and Ruby 1.9.2-p290 installed them.
I installed both versions of ruby
then i installed the gem pik (see https://github.com/vertiginous/pik)
Now, I can switch between Ruby 1.8.7 and 1.9.2 using pik easily
pik 187 (switches to ruby 1.8.7)
So, I switched to ruby 1.8.7. and then installed rails 2.3.8
gem install rails -v 2.3.8
then i said pik 192 which switched the ruby to 1.9.2. Then i said
gem install rails -v 3.1.0
Now to use rails 2.3.8 all I have to do is say pik 187. Not only it switches ruby to 1.8.7 it also switches rails to 2.3.8
I am not a Ruby or Rails expert. But the key to remember is that you need to have the right Ruby version selected while installing rails. Meaning, if you're installing rails 3.1.0 make sure your current ruby version is 1.9.2 or higher or whatever version rails 3 works on. Similarly if you want to install rails 2.3.8 make sure your current ruby version is 1.8.7
Hope this helps. And people won't lose sleep because of this, like i did.
As far as I know, pik doesn't have this feature (yet).
As PIK is no longer maintained, see this commit comment. I would suggest to checkout URU to have version support in Windows (also supports linux and OSX)
If I have bundler do I still need rvm for Rails 3 applications in production?
I'm not pretend to have many ruby version running
You don't need RVM if you are happy with Ruby version bundled with your production server OS.
However Linux distributions usually have old, not patched versions of Ruby. So I suggest to install RVM, this is quite easy to do, and install newest patched Ruby version.
I am following a tutorial about Ruby on Rails, and the tutorial got updated to a new version of Rails, so I can't follow it anymore because I have an older version.
I would like to start new and uninstall Ruby on Rails and any related software on my Mac OS X 10.5.8, and follow it from ground up. If anyone would be willing to help me uninstall Ruby and Ruby on Rails, it would be much appreciated.
Download RVM or RBENV and upgrade to the latest Ruby (2.3.0 at this point). Don't touch your system Ruby.
Are you uninstalling Ruby on Rails, or Ruby AND Ruby on Rails?
If you want to uninstall Ruby on Rails it should be a simple matter of using gem uninstall rails or doing gem dependency rails and then gem uninstall for each of the listed gems that Rails depends on. If you installed them system-wide, using sudo originally, you'll have to use sudo again to uninstall them.
If you want to uninstall a system-wide Ruby you installed from source, well, I'd probably leave it alone and install any new versions of Ruby using RVM. The older version won't be visible to apps unless you want them to see it or set your path to include it. RVM's version will be found first unless you do rvm system.
Actually you could simply install RVM and have it install your new versions of Ruby, then from there install new versions of Rails, without even bothering to uninstall the old stuff. RVM really is that cool.
I've just gone to installed RoR on my snow leopard mac.. and found the rails gem was already installed..
is this normal? Does it need updating?
Does this get installed along with textmate?
It is installed with the Snow Leopard developer tools. Version 1.8.7 of Ruby is installed.
You should be fine for most your development needs. If you wish to upgrade just update the gems:
$ sudo gem install rubygems-update
$ sudo update_rubygems
$ sudo gem update
$ sudo gem update --system
$ sudo gem install rails
I found an incredibly well written install guide at The Pragmatic Studio called Installing Ruby 1.9 and Rails 3 on Mac OS X. It took about an hour to follow, including installing several prerequisites.
I'm hesitant to mess too much with OSX's native installation of ruby/rails, lest things get broken by an Apple system update, so I was very excited to learn about RVM (Ruby Version Manager) which is a cool tool for switching between different ruby/rails installations. The Pragmatic Studio tutorial walks you through installing rvm.
There are a few glitches with the guide, which I'll list here:
Git: I just installed git itself. You do not need to set up a github account.
Git: You may need to manually add /usr/local/git/bin to your PATH. (They don't explicitly tell you to)
RVM: The protocol for the rvm-install-head URL should be https, not http
RVM: The installer complained a lot, but it worked anyway.
RVM: The newly installed ruby 1.9.2 didn't activate until I ran 'rvm 1.9.2' in step 8
All told, this seems like a GREAT approach, and I'm really impressed with their install guide!
Yes, the rails gem is already installed along with Snow Leopard, because you installed developer tools, it's very normal.
But it's a little bit old, you need to update it.
TextMate did not bundle any RoR stuff with this. TextMate just included a lot of bundles which mainly consists of Python and Ruby scripts, if you do not have ruby, textmate will not work.
However, TextMate is originally made on Tiger 10.4, which bundled Ruby 1.8.2, and Snow Leopard bundled Ruby 1.8.7, so TextMate's bundles is not fully compatible with Snow Leopard
Refer to this and get some fix for these issues:
http://wiki.macromates.com/Troubleshooting/SnowLeopard
And also make sure you always keep your RoR bundle to the latest SVN is also a good habit
TextMate is just a text editor. It only understands Rails syntax and file structure making it easy to write Rails apps. That said, you still need to install Rails separately to create Rails apps.
well for me it worked this... I have mountain lion but it worked just fine...