# Rails 2.3.2.not working working with cgi - How to revert

**URL:** <https://www.ruby-forum.com/t/rails-2-3-2-not-working-working-with-cgi-how-to-revert/172290>\
**Category:** Rails\
**Created:** [July 18, 2009, 6:28pm UTC](https://www.ruby-forum.com/t/rails-2-3-2-not-working-working-with-cgi-how-to-revert/172290 "2009-07-18T18:28:22Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![sagarwal1981](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/4bbf92/32.png) [@sagarwal1981](https://www.ruby-forum.com/u/sagarwal1981)\
**Post date:** [July 18, 2009, 6:28pm UTC](https://www.ruby-forum.com/t/rails-2-3-2-not-working-working-with-cgi-how-to-revert/172290/1 "2009-07-18T18:28:22Z")

</div>

Hi All,

As the problem faced by many other folks that rails 2.3.2 is not working  
with cgi, Now I want to revert to rails 2.2.2 on my shared host  
(bluehost ) can anybody guide me how to revert to 2.2.2.

I tried the following:

1. I installed the older rails gem "gem install rails --version 2.2.2  
–include-dependencies  
"

2. I tried to set the PATH env to my rails 2.2.2 version and also  
updated the .gemrc file

but no luck it seems i am still using 2.3.2

Any suggestions please.

Thanks a lot

Regards  
Saurabh

---

<div class="post-metadata">

**Author:** ![sagarwal1981](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/4bbf92/32.png) [@sagarwal1981](https://www.ruby-forum.com/u/sagarwal1981)\
**Post date:** [July 18, 2009, 6:49pm UTC](https://www.ruby-forum.com/t/rails-2-3-2-not-working-working-with-cgi-how-to-revert/172290/2 "2009-07-18T18:49:53Z")

</div>

You have two alternatives.

1. Change the RAILS\_GEM\_VERSION in enviroment.rb
2. Vendor rails (put a full copy of rails in vendor/rails)

On Jul 18, 6:28 pm, Saurabh A. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)

---

<div class="post-metadata">

**Author:** ![sagarwal1981](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/4bbf92/32.png) [@sagarwal1981](https://www.ruby-forum.com/u/sagarwal1981)\
**Post date:** [July 18, 2009, 6:54pm UTC](https://www.ruby-forum.com/t/rails-2-3-2-not-working-working-with-cgi-how-to-revert/172290/3 "2009-07-18T18:54:34Z")

</div>

Hi Saurabh,

On Sat, 2009-07-18 at 18:28 +0200, Saurabh A. wrote:

> 1. I tried to set the PATH env to my rails 2.2.2 version and also  
> updated the .gemrc file
> 
> but no luck it seems i am still using 2.3.2

Best way is probably to freeze the version of rails you want to use in  
your development version, then deploy that to your shared host.

Easiest way is probably to modify environment.rb.  
RAILS\_GEM\_VERSION = ‘2.2.2’  
If that version isn’t available rails will raise an exception and won’t  
start, but at least you’ll know right away.

HTH,  
Bill

---

<div class="post-metadata">

**Author:** ![sagarwal1981](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/4bbf92/32.png) [@sagarwal1981](https://www.ruby-forum.com/u/sagarwal1981)\
**Post date:** [July 20, 2009, 3:13am UTC](https://www.ruby-forum.com/t/rails-2-3-2-not-working-working-with-cgi-how-to-revert/172290/4 "2009-07-20T03:13:16Z")

</div>

I ran into similar issues on Bluehost after they updated rails to  
2.3.2 and realized I had my .htaccess wrong and rails had been running  
in cgi mode. I put together a detailed article with a new bluehost  
rails install guide they haven’t thought to put on the support site  
since the recent upgrade.

> **[Welcome jibwa.com - BlueHost.com](http://jibwa.com/code-and-documentation-for-programmers/bluehost-rails-update-cgi-problems.html)**
>
> Bluehost - Top rated web hosting provider - Free 1 click installs For blogs, shopping carts, and more. Get a free domain name, real NON-outsourced 24/7 support, and superior speed. web hosting provider php hosting cheap web hosting, Web hosting,...

On Jul 18, 10:47 am, Saurabh A. \<rails-mailing-l…@andreas-

---

<div class="post-metadata">

**Author:** ![sagarwal1981](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/4bbf92/32.png) [@sagarwal1981](https://www.ruby-forum.com/u/sagarwal1981)\
**Post date:** [July 18, 2009, 7:47pm UTC](https://www.ruby-forum.com/t/rails-2-3-2-not-working-working-with-cgi-how-to-revert/172290/5 "2009-07-18T19:47:07Z")

</div>

Thanks a lot it seems that this problem is solved but I am still I am  
facing issue , If any rails guru can help:

On the webpage I am getting the following error : Rails application  
failed to start properly

Following is the output of dispatch.fcgi .

./dispatch.fcgi  
Requiring REXML  
Content-Type: text/html; charset=utf-8  
Set-Cookie: \_session\_id=f39adc9190bf58558fa67712b9fe29cf; path=/  
Status: 302 Found  
Location: http://:/account/login  
X-Runtime: 1ms  
Cache-Control: no-cache  
Content-Length: 88

You are being redirected.removed\_email\_address@domain.invalid

Thanks  
Saurabh

bill walton wrote:

> Hi Saurabh,
> 
> On Sat, 2009-07-18 at 18:28 +0200, Saurabh A. wrote:
> 
> > 1. I tried to set the PATH env to my rails 2.2.2 version and also  
> > updated the .gemrc file
> > 
> > but no luck it seems i am still using 2.3.2
> 
> Best way is probably to freeze the version of rails you want to use in  
> your development version, then deploy that to your shared host.
> 
> Easiest way is probably to modify environment.rb.  
> RAILS\_GEM\_VERSION = ‘2.2.2’  
> If that version isn’t available rails will raise an exception and won’t  
> start, but at least you’ll know right away.
> 
> HTH,  
> Bill
