Switch versions of Rails

Hi, all.

This is probably a very simple question but I couldn’t find anything in
the
docs, Google, etc.

If I issue:

$ rails new foo-bar

The version of Rails being used is 3.1.3. Now I need to use v.2.3.5 for
a
project but can’t for the life of me work out how to do so (2.3.5 is
installed).

Sorry it’s so (probably) blatantly obvious a question but any help
appreciated.

Cheers,

Phil...


Nothing to see here… move along, move along

On Fri, Dec 2, 2011 at 8:51 PM, Phil D. [email protected]
wrote:

project but can’t for the life of me work out how to do so (2.3.5 is
installed).

Sorry it’s so (probably) blatantly obvious a question but any help
appreciated.

Hi Phil,
Are you using RVM? If so, I would recommend you to create a new
gemset, install rails -v 2.3.5 there, and then you’ll have no
conflicts.

Anyways, wehter you use a different gemset, rails 2.x doesn’t use the
“new” command. To create a new aplication with these versions of
rails, you have to do “rails appname” but, for this, you have to be
sure you’re using the right command and that, can be done with the
full path to the rails script.

Hope this help.
Cheers!


Leonardo M…
There’s no place like ~

On 3/12/11 00:51, “Leonardo M.” [email protected] wrote:

Are you using RVM? If so, I would recommend you to create a new
gemset, install rails -v 2.3.5 there, and then you’ll have no
conflicts.

Anyways, wehter you use a different gemset, rails 2.x doesn’t use the
“new” command. To create a new aplication with these versions of
rails, you have to do “rails appname” but, for this, you have to be
sure you’re using the right command and that, can be done with the
full path to the rails script.

Hi, Leonardo.

Thanks for the help. I do have rvm but I’m using the System (OS X)
version
1.8.7 of Ruby for this particular venture. Having only used rails 3
before I
can see I need to do some reading ;-).

Cheers,

Phil...


Nothing to see here… move along, move along

On Dec 2, 11:51pm, Phil D. [email protected] wrote:

project but can’t for the life of me work out how to do so (2.3.5 is
installed).

Sorry it’s so (probably) blatantly obvious a question but any help
appreciated.

If foo is an executable installed by a gem then

foo 2.3.5 should run the executable from version 2.3.5 of that gem

Fred

I don’t understand why rails 3 won’t work with ruby 1.8.7

Blog: http://random8.zenunit.com/
Twitter: http://twitter.com/random8r
Learn: http://sensei.zenunit.com/
New video up now at http://sensei.zenunit.com/
real fastcgi rails deploy process! Check it out now!

On 3 December 2011 07:26, Julian L. [email protected]
wrote:

I don’t understand why rails 3 won’t work with ruby 1.8.7

It will, and it does for me.

What has that got to do with OP’s question?

Colin

This thread may help you

On Sat, Dec 3, 2011 at 4:02 PM, Colin L. [email protected]
wrote:

You received this message because you are subscribed to the Google G.
“Ruby on Rails: Talk” group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en.

Please consider the environment before printing this email.

Regards,
Surya

On 2 December 2011 23:51, Phil D. [email protected] wrote:

project but can’t for the life of me work out how to do so (2.3.5 is
installed).

Just one point to add to the other suggestions that you use rvm and
gemsets, which is not to use 2.3.5 but the latest 2.3.x (if you really
need to use 2.3 at all). I believe there have been security fixes
that you should have.

Out of interest, why do you need to use 2.3 for a new project?

Colin

On 3/12/11 11:16, “Colin L.” [email protected] wrote:

Just one point to add to the other suggestions that you use rvm and
gemsets, which is not to use 2.3.5 but the latest 2.3.x (if you really
need to use 2.3 at all). I believe there have been security fixes
that you should have.

Out of interest, why do you need to use 2.3 for a new project?

Hi, Colin.

The server I’ll be deploying on, so I’m reliably informed, is geared up
to
v.2.3.5 of rails so that’s what I’ve been asked to use.

I’ll check about later releases of 2.3.x. Thanks for your help,

Cheers,

Phil...


Nothing to see here… move along, move along

On 3/12/11 11:05, “Surya” [email protected] wrote:

This thread may help you
ruby - How can I use multiple versions of rails in the same machine - Stack Overflow
rails-in-the-same-machine/7205231#7205231

Thanks, Surya. That’s exactly what I’ve been looking for.

Cheers,

Phil...


Nothing to see here… move along, move along

On 3 December 2011 17:20, Phil D. [email protected] wrote:

The server I’ll be deploying on, so I’m reliably informed, is geared up to
v.2.3.5 of rails so that’s what I’ve been asked to use.

I’ll check about later releases of 2.3.x. Thanks for your help,

In addition I would seriously question the use of 2.3 versus 3.1. 2.3
is only receiving security fixes now I believe (not bug fixes) and it
is not trivial to update an app from 2.3 to 3. If the app is expected
to have a significant life then using 2.3 just because the server is
currently geared up for that is surely a questionable decision.

Colin

On 3/12/11 20:04, “Colin L.” [email protected] wrote:

In addition I would seriously question the use of 2.3 versus 3.1. 2.3
is only receiving security fixes now I believe (not bug fixes) and it
is not trivial to update an app from 2.3 to 3. If the app is expected
to have a significant life then using 2.3 just because the server is
currently geared up for that is surely a questionable decision.

I have mentioned to the party involved that getting the web hosting
people
to upgrade is a very good idea partly because I’m just cutting my teeth
on
rails & all the work I’ve done so far has been on v.3 & I also thought
that
the hosting company will get a memo from HQ saying all the servers are
getting an upgrade & it’ll leave me, as you said, upgrading a live site.

I think I’ll be more adamant with the client about this & explain as
well as
I can the circumstances to her. Unfortunately, she’s not at all
computer-minded shall we say…

Cheers,

Phil.


Nothing to see here… move along, move along

On 04 Dec 2011, at 19:26, Phil D. wrote:

people to
can the circumstances to her. Unfortunately, she’s not at all
computer-minded
shall we say…

Just as a follow-up to this thread, the web hosting company are
telling me
in order to get rails v.3 I have to go down the dedicated server
route.
Don’t think the client is going to stand an extra 180 a month on the
bill…

Seems to me you’re dealing with a 6 for unlimited space and unlimited
bandwidth kind of hosting company. Good enough (although I would even
doubt that) for a personal blog, not fit for anything else, you get
what you pay for. You can get proper VPS hosting for a lot less than a
dedicated server will cost you, like Linode. Or you could just make it
easy on yourself and use Heroku.

Best regards

Peter De Berdt

On 4/12/11 02:49, “Phil D.” [email protected] wrote:

& all the work I’ve done so far has been on v.3 & I also thought that the
hosting company will get a memo from HQ saying all the servers are getting an
upgrade & it’ll leave me, as you said, upgrading a live site.

I think I’ll be more adamant with the client about this & explain as well as I
can the circumstances to her. Unfortunately, she’s not at all computer-minded
shall we say…

Just as a follow-up to this thread, the web hosting company are telling
me
in order to get rails v.3 I have to go down the dedicated server route.
Don’t think the client is going to stand an extra 180 a month on the
bill…

Cheers,

Phil.


Nothing to see here… move along, move along

On 4/12/11 18:48, “Peter De Berdt” [email protected] wrote:

Seems to me you’re dealing with a 6 for unlimited space and unlimited
bandwidth kind of hosting company. Good enough (although I would even doubt
that) for a personal blog, not fit for anything else, you get what you pay
for. You can get proper VPS hosting for a lot less than a dedicated server
will cost you, like Linode. Or you could just make it easy on yourself and use
Heroku.

I do use heroku (& S3/EC2 & PHP Cloud) but I wanted to put this site up
for
a fixed price with as little fuss as possible. & it is her blog & she is
dead-set against WordPress, Textpattern, etc.

Cheers,

Phil...


Nothing to see here… move along, move along

On 04 Dec 2011, at 20:11, Phil D. wrote:

Heroku.

I do use heroku (& S3/EC2 & PHP Cloud) but I wanted to put this site
up for
a fixed price with as little fuss as possible. & it is her blog &
she is
dead-set against WordPress, Textpattern, etc.

The main problem with cheap hosting companies is that they use more or
less one-click installers like cpanel or plesk. They generally don’t
upgrade all too quickly to newer technologies or versions, both on the
hosting company side as the control panel provider. I’m guessing it’s
more of a “if it ain’t broke, don’t fix it” thing than something else.

We’ve had our fair share of horror experiences in the past, so I
totally get the dilemma you are facing. I do want to add that even
getting a Rails app properly running, even when you’re talking about a
2.3 app, will probably yield another round of frustrations. Support
tends to be totally ignorant on Rails apps and you basically get a
copy-paste section of the cpanel manual.

I’m quite sure there are some fixed price hosting companies out there,
http://hostingrails.com/sharedhosting
springs to mind, but they are also stuck on 3.0 it seems (byebye
asset pipeline etc).

Out of curiosity, what kind of fuss are you talking about? Ease of
deployment or having to advise someone to switch hosting providers?

Best regards

Peter De Berdt

On 4/12/11 19:40, “Peter De Berdt” [email protected] wrote:

[snip]

Out of curiosity, what kind of fuss are you talking about? Ease of
deployment or having to advise someone to switch hosting providers?

Hi, Peter.

Mainly ease of deployment & the fact she loves the blog app I did for
her as
an example in rails. She’s also used the same hosting outfit for years &
to
be fair to them for the money, they’re a pretty good deal.

But they’re already have been some problems installing some gems
(luckily I
don’t need them for this project) so I’ll have to see how it goes
because as
you quite rightly pointed out, contacting support for issues like that
is
pretty much time spent wasted typing…

Cheers,

Phil...


Nothing to see here… move along, move along