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.
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.
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 ;-).
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.
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
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?
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...
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.
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?
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...