views:

129

answers:

2

So I'm learning Rails and I decided to check out my cheap hosting options on GoDaddy, and their versions look like this. Are all the GEMs relevant in a normal Rails app (defining that liberally), or is just the Rails version? My guess is that is would be actionpack and rails, perhaps?

If it is just the Rails version, GoDaddy is using 1.1.2 and I'm running 2.2.2. This is the same situation as with the ActionPack. What's a developer to do?

a) downgrade to their version of the GEMs and learn to develop against those?

b) develop for the new versions of the GEMs as most stuff doesn't change much anyway?

c) Give up. Shared hosting is really a joke, if you want to host rails apps you must have at least a Virtual Dedicated Server somewhere?

d) Something I didn't think of, which is why I'm asking this question in the first place?

I might note that, if c is the answer, that's pretty annoying because for ASP.Net shared hosting basically works without a hitch.

+3  A: 

I use Dreamhost, which usually has the most up to date gems (listed here.)

Otherwise, you should be able to vender your gems and Rails. The vendored versions should override whatever is installed on the system.

Zach
That vender thing looks fascinating. My only question, which I can resolve reading the link, of course, is if I need to install or or if it's just an .rb (only the latter is possible).
Yar
It seems that you do not need root access or anything to vendor your gems. Pretty cool!
Yar
+3  A: 

You can bundle all the gems you need in the vendor directory, including rails itself.

See there for a complete explanation.

Keltia
I'm pretty sure I cannot do this without root access, right?
Yar
No. Freezing your gems basically copies them (all their .rb files) to the vendor folder in your project. No special permissions should be required.
Dave Ray
Thanks Dave, so basically gems are ONLY .rb files? I thought they can have a binary piece...
Yar
Some gems include native code. Most don't. You may have issues if you try to freeze one that does have native code.
Otto