Newbie question - VirtualRails

Hi,

Have been trying to set up Linux on my Windows machine, using
VirtualBox..

Installed VirtualRails to give it a try as well..

I did notice VR was using Rails version 2.3.4 rather than 2.3.5 (rails
-v gives 2.3.4) as specified on Some of VR's documentation (some
places mention rails 2.3.4 and some rails 2.3.5, like here:
http://groups.google.com/group/rubyonrails-talk/browse_frm/thread/9fcc04508132033d/d5e9a52f44764924?tvc=1#d5e9a52f44764924
)

Have been trying to update to rails 2.3.5 using gem install and gem
update, specifying the version.. but so far didn't manage to do so..
I'm not sure how as well, being a complete newbie to Linux, and also
afraid to cause any damage.. was also afraid to update gems I do not
wish to update or to update rails to 2.3.8 while I wanted 2.3.5 and
don't feel confident I know how to change it back yet..

Maybe it's not an issue and I should do with rails 2.3.4.. now I'm
also curious to know how and whether this should be done at all

Any comments and replies will be very much appreciated :slight_smile:

Thanks!

Best,
tino.

Have been trying to set up Linux on my Windows machine, using
VirtualBox..

Installed VirtualRails to give it a try as well..

Have been trying to update to rails 2.3.5 using gem install and gem
update, specifying the version.. but so far didn't manage to do so..

What did you try, and why do you think it didn't work?

I'm not sure how as well, being a complete newbie to Linux, and also
afraid to cause any damage.. was also afraid to update gems I do not
wish to update or to update rails to 2.3.8 while I wanted 2.3.5 and
don't feel confident I know how to change it back yet..

1) `gem --help` should show you how to update gems

2) One of the whole points of using a VM like VirtualBox is the ability
    to take "snapshots" of the state of the system. Install a fresh version
    of VirtualRails, confirm it works, then take a snapshot.

    Now you can do anything you like, and worst case you revert to
    that snapshot. It's like git for your OS :slight_smile:

FWIW,

@Hassan - Thanks :slight_smile:

I'll look into creating snapshots right away :slight_smile:
then will experiment with the gem update and all and in case I still
don't get it till then - will rewrite the question in more detail,
including what I did and what I got in return..

thanks again :slight_smile:

tino

tinoD wrote:

Hi,

Have been trying to set up Linux on my Windows machine, using
VirtualBox..

Installed VirtualRails to give it a try as well..

I did notice VR was using Rails version 2.3.4 rather than 2.3.5 (rails
-v gives 2.3.4) as specified on Some of VR's documentation (some
places mention rails 2.3.4 and some rails 2.3.5, like here:
http://groups.google.com/group/rubyonrails-talk/browse_frm/thread/9fcc04508132033d/d5e9a52f44764924?tvc=1#d5e9a52f44764924
)

Have been trying to update to rails 2.3.5 using gem install and gem
update, specifying the version.. but so far didn't manage to do so..
I'm not sure how as well, being a complete newbie to Linux, and also
afraid to cause any damage.. was also afraid to update gems I do not
wish to update or to update rails to 2.3.8 while I wanted 2.3.5 and
don't feel confident I know how to change it back yet..

Maybe it's not an issue and I should do with rails 2.3.4.. now I'm
also curious to know how and whether this should be done at all

Any comments and replies will be very much appreciated :slight_smile:

Thanks!

Best,
tino.

Hi Tino,

Thanks for using VirtualRails :slight_smile:
you're right, there was a mistake in our documentation, now the Rails
version mentioned vor virtualrails 1.1 will be everywhere 2.3.4, and we
will soon release a new version with rails 2.3.5 rails.

with the actual 1.1 version, you can open a terminal and run the
following command :
sudo gem install rails --version 2.3.5

it works just fine, and you will have the followinf output :

virtualrails@jay ~ $ sudo gem install rails --version 2.3.5
[sudo] password for virtualrails:

Successfully installed activesupport-2.3.5
Successfully installed activerecord-2.3.5
Successfully installed actionpack-2.3.5
Successfully installed actionmailer-2.3.5
Successfully installed activeresource-2.3.5
Successfully installed rails-2.3.5
6 gems installed
Installing ri documentation for activesupport-2.3.5...
Installing ri documentation for activerecord-2.3.5...
Installing ri documentation for actionpack-2.3.5...
Installing ri documentation for actionmailer-2.3.5...
Installing ri documentation for activeresource-2.3.5...
Installing ri documentation for rails-2.3.5...
Installing RDoc documentation for activesupport-2.3.5...
Installing RDoc documentation for activerecord-2.3.5...
Installing RDoc documentation for actionpack-2.3.5...
Installing RDoc documentation for actionmailer-2.3.5...
Installing RDoc documentation for activeresource-2.3.5...
Installing RDoc documentation for rails-2.3.5...

hope it will help :slight_smile:
please feel free to send me support questions if you have troubles using
VirtualRails !

Jérôme Fillioux
VirtualRails Team

i’ve been using virtual rails for about 10 days, and it’s been a easy way to jump back into Rails development. Only thing that confused me in the beginning was the keyboard layout defaulted to French. no big deal, just a few minutes of work. Otherwise it’s a great setup, and I really appreciate the work.

Jason

jason white wrote:

i've been using virtual rails for about 10 days, and it's been a easy
way to
jump back into Rails development. Only thing that confused me in the
beginning was the keyboard layout defaulted to French. no big deal, just
a
few minutes of work. Otherwise it's a great setup, and I really
appreciate
the work.

Jason

Hi Jason,

thank you for your comment, we're glad you appreciate VirtualRails !

the very next version will have the US keyboard layout as default :slight_smile:

Jérôme Fillioux
VirtualRails team

Hi Jerome,

Thank you for your comment.
I realise now this was what I was supposed to do.
Let me describe what I did and your feedback can help me decide
whether I can continue with what I've done or should go back to the
backup I made before starting my experiments, using clonevdi (using
VBoxManage).

So..
What I did was:

1) sudo gem update --system
2) sudo gem update
3) sudo gem install -v=2.3.5 rails --include-dependencies

In more detail, what happened, including some problems on the way:

1)

ok.. back to my backup..

sorry for the long last message..
this one continues the previous one :slight_smile:

I currently have:

ok.. back to my backup..

sorry for the long last message..
this one continues the previous one :slight_smile:

I currently have:

ok.. back to my backup..

sorry for the long last message..
this one continues the previous one :slight_smile:

I currently have:

Hi Tino,
I think your problems are simple than you think :slight_smile:

first, don't bother upgrading successfully nokogiri until you really
need to
use it in your project. and don't worry about the failed update, on
won't
have any side effect.

about the rails version, there is only one thing to consider IMO :
- if you start a new rails application, use the last "stable"
version,
i.e 2.3.8 : less bugs, more speed, more security.
- if you work on an existing rails app, use the rails version that has
been
used to create and developp this application. Until you have a real good
reason to migrate your app to a newer version of rails, don't :slight_smile:

one interessant thing you have to know is that you can have several
rails
versions installed on your system, and choose the one to use in the
configuration file of your rails project. In the
/config/environnement.rb
file, add somthing like that :
# Specifies gem version of Rails to use when vendor/rails is not present
RAILS_GEM_VERSION = '2.3.5' unless defined? RAILS_GEM_VERSION

regarding all this, I think you can stay with your original snapshop,
and
choose the rails version you want to use.
but you can also use a fresh downloaded virtualrails and upgrade only
rails
if you want, it takes only 5 minutes and you will be more confortable
with
the idea that only rails have been upgraded :slight_smile:

about the place you should put your files, your right :
the "/home/virtualrails/" is like the "My Documents" for MS Windows,
"virtualrails" being the name of the connected user.
for exemple you can create a folder named "rails_apps" or "dev", or
what
you want under the "/home/virtualrails/" directory, and put here all
your
future rails projects.

cheers up,
keep learning Linux and Rails, it really worth the price :slight_smile:

Jérôme Fillioux
VirtualBox Team

Hi Jerome,

Thank you for replying.. I appreciate the detailed response and being
patient for my beginner's questions :slight_smile:

Also, I want to apologise as I seems my last message was sent a couple
of times :stuck_out_tongue:

I'm very excited with my shift to Linux and very happy about
VirtualRails.. and no doubt it's worth it :wink:

Since I think any projects I started on Windows should now anyway be
re-written on Linux (also since I'm planning to deploy on a linux
host, which was mainly what made me shift at this point of time to
Linux.. but it was anyway just a matter of time till I do move.. just
made things quicker..) - I'll begin using rails 2.3.8 :slight_smile:
Glad nokogiri not updating successfully is not going to cause me any
problems, and right now I'm not using it anyway, though it seems nice
after doing some reading..

about environment.rb - I realised this is where I should mention the
rails version.. but thanks for mentioning it and validating what I
thought.. same goes for my virtualrails' home directory, it really
helped me you answered this very basic question for me :slight_smile:

Many thanks and thank you for your VirtualRails project.

Best,

tino

hello again, Tino :slight_smile:

I missed a point in my answer :

Since I think any projects I started on Windows should now anyway be
re-written on Linux (also since I'm planning to deploy on a linux
host, which was mainly what made me shift at this point of time to
Linux.. but it was anyway just a matter of time till I do move.. just
made things quicker..) - I'll begin using rails 2.3.8 :slight_smile:

if you are talking about rails projects, that's not true :slight_smile:
and if your projects where written for rails 2 or greater, there is
likely nothing to do to run them under linux :slight_smile:

the rails and ruby code is "OS agnostic", since it is executed on a ruby
VM. That ruby layer depend on the OS you use, but allow a transversal
compatibility of your ruby and rails code.

so again, if your apps used to run correctly on windows with rails 2.x
and ruby 1.8.6 or 1.8.7, then you just have to settle them on your
virtualrails and that's it !

let me know the details of all of that and if it works.
if you have troubles, trust the ruby/rails guys around here (including
myself) to try to help you :slight_smile:

best

Jérôme Fillioux
VirtualRails Team