What to do when your host doesn't have rails 2.0 yet

I’m working on my first rails application, and I’d like to just go
ahead and do it in rails 2.0.

My hosting provider (bluehost) has rails 1.2.6 installed right now
though, and hasn’t upgraded yet.

Can I develop on my own machine in 2.0, then freeze the app, and
upload it to my server? Or am I kind of stuck until they have 2.0
running?

Thanks.

On 1/2/08, [email protected] [email protected] wrote:

I’m working on my first rails application, and I’d like to just go
ahead and do it in rails 2.0.

My hosting provider (bluehost) has rails 1.2.6 installed right now
though, and hasn’t upgraded yet.

Can I develop on my own machine in 2.0, then freeze the app, and
upload it to my server? Or am I kind of stuck until they have 2.0
running?

Yes.

Freezing to a specific version of Rails in a shared environment is a
good idea anyway, just on the off-chance they do a gem cleanup or
something.


Greg D.
http://destiney.com/

Greg D. wrote:

On 1/2/08, [email protected] [email protected] wrote:

Yes.


Greg D.
http://destiney.com/

Hey Greg, can he do the upgrade himself with SSH?

On Wed, Jan 02, 2008 at 12:05:44PM -0800, [email protected]
wrote:

I’m working on my first rails application, and I’d like to just go
ahead and do it in rails 2.0.

My hosting provider (bluehost) has rails 1.2.6 installed right now
though, and hasn’t upgraded yet.

Can I develop on my own machine in 2.0, then freeze the app, and
upload it to my server? Or am I kind of stuck until they have 2.0
running?

I’ve been doing some work (pro bono, actually) for someone with
Bluehost.
You can install your own gems, including Rails, in your home directory.
See
http://helpdesk.bluehost.com/kb/index.php?x=&mod_id=2&id=418

You can probably do it over FTP, but it’s much easier over SSH.

Thanks.
–Greg

On Jan 2, 8:02 pm, Gregory S. [email protected]
wrote:

On Wed, Jan 02, 2008 at 12:05:44PM -0800, [email protected] wrote:

I’ve been doing some work (pro bono, actually) for someone with Bluehost.
You can install your own gems, including Rails, in your home directory. Seehttp://helpdesk.bluehost.com/kb/index.php?x=&mod_id=2&id=418

You can probably do it over FTP, but it’s much easier over SSH.

Thanks.

–Greg

Perfect! Thanks for the help.

[email protected] wrote:

On Jan 2, 9:38 pm, “[email protected]
[email protected] wrote:

–Greg

Perfect! Thanks for the help.

Well, I tried the steps below from the link:


  1. Using File Manager in your cPanel make a copy of the .bashrc file
    in your root directory, name it .bashrc.bak.
  2. Now edit the .bashrc file and add the following to the end of the
    file:

export PATH=“$PATH:$HOME/packages/bin:$HOME/.gems/bin”
export GEM_HOME=“$HOME/.gems”
export GEM_PATH=“$GEM_HOME:/usr/lib/ruby/gems/1.8”
export GEM_CACHE=“$GEM_HOME/cache”

  1. Using your favorite SSH client connect to your site.
  2. at the prompt type:
    cp /usr/lib/ruby/gems/1.8/cache/sources-0.0.1.gem ./
    gem install sources-0.0.1.gem
    gem update -y
    This will update rails to the latest version and install it to your
    local gem directory.

The output of gem update -y was only a message that no gems were
updated. (Actually it was something like [] gems updated.)

I tried to do gem install rails, and it ended up installing a local
copy of rails 1.2.0.

Any ideas?

Thanks.

  1. I tried updating by following the above steps but failed… there was
    no file named sources-0.0.1.gem I just downloaded it from rubyforge and

  2. tried: “gem update -y” but there were many errors on rails
    installation.

  3. but “gem install rails” got rails 2.0.2 installed without any
    issues… so far so good. got to test it by using a rail app to make sure
    it works :slight_smile:

hope this helps…

On Jan 2, 9:38 pm, “[email protected]
[email protected] wrote:

–Greg

Perfect! Thanks for the help.

Well, I tried the steps below from the link:


  1. Using File Manager in your cPanel make a copy of the .bashrc file
    in your root directory, name it .bashrc.bak.
  2. Now edit the .bashrc file and add the following to the end of the
    file:

export PATH=“$PATH:$HOME/packages/bin:$HOME/.gems/bin”
export GEM_HOME=“$HOME/.gems”
export GEM_PATH=“$GEM_HOME:/usr/lib/ruby/gems/1.8”
export GEM_CACHE=“$GEM_HOME/cache”

  1. Using your favorite SSH client connect to your site.
  2. at the prompt type:
    cp /usr/lib/ruby/gems/1.8/cache/sources-0.0.1.gem ./
    gem install sources-0.0.1.gem
    gem update -y
    This will update rails to the latest version and install it to your
    local gem directory.

The output of gem update -y was only a message that no gems were
updated. (Actually it was something like [] gems updated.)

I tried to do gem install rails, and it ended up installing a local
copy of rails 1.2.0.

Any ideas?

Thanks.

Buddhi De silva wrote:

[email protected] wrote:

On Jan 2, 9:38 pm, “[email protected]
[email protected] wrote:

–Greg

Perfect! Thanks for the help.

Well, I tried the steps below from the link:


  1. Using File Manager in your cPanel make a copy of the .bashrc file
    in your root directory, name it .bashrc.bak.
  2. Now edit the .bashrc file and add the following to the end of the
    file:

export PATH=“$PATH:$HOME/packages/bin:$HOME/.gems/bin”
export GEM_HOME=“$HOME/.gems”
export GEM_PATH=“$GEM_HOME:/usr/lib/ruby/gems/1.8”
export GEM_CACHE=“$GEM_HOME/cache”

  1. Using your favorite SSH client connect to your site.
  2. at the prompt type:
    cp /usr/lib/ruby/gems/1.8/cache/sources-0.0.1.gem ./
    gem install sources-0.0.1.gem
    gem update -y
    This will update rails to the latest version and install it to your
    local gem directory.

The output of gem update -y was only a message that no gems were
updated. (Actually it was something like [] gems updated.)

I tried to do gem install rails, and it ended up installing a local
copy of rails 1.2.0.

Any ideas?

Thanks.

  1. I tried updating by following the above steps but failed… there was
    no file named sources-0.0.1.gem I just downloaded it from rubyforge and

  2. tried: “gem update -y” but there were many errors on rails
    installation.

  3. but “gem install rails” got rails 2.0.2 installed without any
    issues… so far so good. got to test it by using a rail app to make sure
    it works :slight_smile:

hope this helps…

I was able to install rails 2.0.2 to my local directory also and was
able to successfully create a rails 2.0.2 project. HOWEVER, I get the
“Rails application failed to start properly” when I test out my
application. Does anybody know why this is? Is it because the server
can’t handle rails 2.0.2 requests?

BTW, I can get a rails 1.2.6 project working fine on bluehost by
changing the permissions in the public directory. However like i said,
no luck with rails 2.0.2.

it’s a pretty good practice to freeze rails in any production
environment to avoid updates that might affect your app. This way, no
matter if you are local or deploying on the server it will always run
off of what version you froze into the app.

Does anyone know how to change the path to a specific rails installation
you would like the server to use? For example, i installed rails 2.0.2
in my local directory, but when i’m making requests to the server its
still using the rails installed on the /usr/lib/ruby/1.8.

[email protected] wrote:

Do you have a vendor directory where you installed Rails? Normally if
you have a vendor directory your app should refer to the Rails setup
contained there first.

How would I go about doing what you described?

Do you have a vendor directory where you installed Rails? Normally if
you have a vendor directory your app should refer to the Rails setup
contained there first.

Melvin R. wrote:

rake rails:freeze:gems

I believe i tried that but it doesnt work because bluehost doesnt have
subversion.

rake rails:freeze:gems

Put this line in your environment.rb, and it should work:
ENV[‘GEM_PATH’] = ‘/home/yourhome/yourgem-home’

Ken Le wrote:

Does anyone know how to change the path to a specific rails installation
you would like the server to use? For example, i installed rails 2.0.2
in my local directory, but when i’m making requests to the server its
still using the rails installed on the /usr/lib/ruby/1.8.

I don’t think that requires subversion. Give it a spin