Rvm

I wanted to know if i should use RVM? I have been using rails more and
more and more now and am looking to keep ruby and ruby gems better
together. Is it worth using RVM? And what does it acually do other
then able me to swtich between ruby 1.8 and 1.9?

On Mon, Oct 24, 2011 at 8:17 PM, Gethernm [email protected] wrote:

I wanted to know if i should use RVM?

Yes.

I have been using rails more and
more and more now and am looking to keep ruby and ruby gems better
together. Is it worth using RVM? And what does it acually do other
then able me to swtich between ruby 1.8 and 1.9?

2 important things it does for me are:

  1. I make a gemset for every new project or testing with a new Rails
    version
    etc.

So every time, I have a new, clean gem environment (example below)

  1. it allows me to install multiple ruby versions, in my local home
    directory, without
    worrying about the version that could be (or maybe not, I don’t care)
    installed by root
    in the central /usr/… directories.

HTH,

Peter

##################

Example of using rvm gemset : with a new gemset it is really easy to
bootstrap a new Rails
project, without interfering with the existing ones.

[email protected]:~/data/temp$ rvm use 1.9.3 Using /home/peterv/.rvm/gems/ruby-1.9.3-rc1

[email protected]:~/data/temp$ rvm gemset list

gemsets for ruby-1.9.3-rc1 (found in
/home/peterv/.rvm/gems/ruby-1.9.3-rc1)
contact_app
global

[email protected]:~/data/temp$ rvm gemset create fancy
‘fancy’ gemset created (/home/peterv/.rvm/gems/[email protected]).

[email protected]:~/data/temp$ rvm use [email protected]
Using /home/peterv/.rvm/gems/ruby-1.9.3-rc1 with gemset fancy

[email protected]:~/data/temp$ gem list

*** LOCAL GEMS ***

rake (0.9.2)

[email protected]:~/data/temp$ gem install bundler
Fetching: bundler-1.0.21.gem (100%)
Successfully installed bundler-1.0.21
1 gem installed

[email protected]:~/data/temp$ gem install rails
Fetching: multi_json-1.0.3.gem (100%)

Successfully installed rails-3.1.1
29 gems installed

[email protected]:~/data/temp$ rails new fancy --skip-bundle -d postgresql -T
create

create vendor/plugins/.gitkeep

[email protected]:~/data/temp$ cd fancy

[email protected]:~/data/temp/fancy$ echo “gem ‘therubyracer’” >> Gemfile

[email protected]:~/data/temp/fancy$ bundle install
Fetching source index for http://rubygems.org/
Installing rake (0.9.2.2)
Using multi_json (1.0.3)

Installing uglifier (1.0.4)
Your bundle is complete! Use bundle show [gemname] to see where a
bundled
gem is installed.

[email protected]:~/data/temp/fancy$ vim config/database.yml

[email protected]:~/data/temp/fancy$ rake db:create # will create
fancy_development and fancy_test databases

[email protected]:~/data/temp/fancy$ rake environment # this should return
without
errors

On 25 Oct 2011, at 09:49, Peter V. wrote:

So every time, I have a new, clean gem environment (example below)

[email protected]:~/data/temp$ rvm gemset list
Using /home/peterv/.rvm/gems/ruby-1.9.3-rc1 with gemset fancy
You can even streamline this a bit more by putting a .rvmrc file in
your project folder:

/myproject/.rvmrc

rvm_gemset_create_on_use_flag=1
rvm use @

RVM will automatically switch to the proper gemset and ruby version as
you “cd” into the project folder (or out of it). There’s a lot more
options available in the documentation.

http://beginrescueend.com/workflow/rvmrc/

Best regards

Peter De Berdt

This may help:
http://jessecravens.com/09262011/rvm-ruby-version-manager-and-ruby-rails

On Mon, Oct 24, 2011 at 1:17 PM, Gethernm [email protected] wrote:

[email protected]
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en.


Jesse Cravens
jessecravens.com
m. 210.392.1542

Yes. +1 on everything peter said.
RVM will make your life a lot easier and it helps you manage multiple
projects much better.

Also… you don’t have to sudo all the time when you’re using RVM.

RVM +1. C’est le fun.

Easy site, pretty straight forward.

Hi!

I like RVM, but after watching this Railscasts I saw that we have
another
good alternatives:

http://railscasts.com/episodes/292-virtual-machines-with-vagrant

On 29 Oct 2011, at 01:53, Everaldo G. wrote:

I like RVM, but after watching this Railscasts I saw that we have
another good alternatives:

http://railscasts.com/episodes/292-virtual-machines-with-vagrant

Vagrant is really nice, but I see it more as a solution to test your
production environment locally than to manage gems or ruby versions.

Those VM images can be quite big, but are great to use as a staging
server to make sure your production server will be able to run your
Rails app (or an update) without any problems. Setting up your
production environment on a virtual machine (a staging server if you
want to call it that way) is great, especially combined with Chef. You
can be fairly certain that your production server won’t go down
because of some incompatibility or different/lacking dependencies
between your e.g. OS X machine and your Ubuntu production server.

Best regards

Peter De Berdt

YES YOU SHOULD, it will save you a lot of headaches and it
is the preferred way to install ruby nowadays

On Fri, Oct 28, 2011 at 6:46 PM, Brandon B.
[email protected]wrote:

then able me to swtich between ruby 1.8 and 1.9?


Jazmin

On Sat, Oct 29, 2011 at 9:32 AM, Peter De Berdt
[email protected]wrote:

production environment locally than to manage gems or ruby versions.

He is not talking about Vagrant , he is talking about
rbenvhttps://github.com/sstephenson/rbenvwhich is mentioned in the
episode

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs