Bypassing rack version error using Rails 2.3.5

后端 未结 9 1689
既然无缘
既然无缘 2020-12-05 21:33

I\'m currently on Dreamhost attempting to run a Rails 2.3.5 app.

Here is the situation, Dreamhost\'s servers have Rails 2.2.2 installed. Of course, I can\'t update a

相关标签:
9条回答
  • 2020-12-05 21:48

    FWIW, I can confirm that freezing the gem does not solve the problem; in fact, where before my deploy was exploding (using DH's Rack 0.3.0, somehow!), now my spin-up blows up with the same error seen above. Perhaps it's finally time to move my toy/proof of concept app to 'real' hosting if I want to get any work done.

    UPDATE: My server was upgraded to Rack 1.0.1 on Dec 24th 2009, solving the issue for me. If you are still experiencing problems on your account I would recommend messaging support; they were fairly responsive in my case (with emails, not action, but for the price you really can't have it all).

    0 讨论(0)
  • 2020-12-05 21:51

    I ran into the same problem when I tried upgrading to 2.3.5.

    I wonder what server you are on that still runs Rails 2.2.2? I thought Dreamhost had moved everybody to 2.3.4 by now. I complained with them 3 months ago and they upgraded Passenger on my server the day after so I could install the current Rails version. So I'd recommend you to file a support ticket if Rails 2.3.5 is vital for your app. But there weren't many changes between 2.3.4 and 2.3.5, so chances are your app will run just as well on 2.3.4. Did you try running it on vendored 2.3.4?

    This isn't about a missing gem, it's about a gem that is being required twice with mismatching versions. rake gems:unpack:dependencies doesn't fix that (I tried).

    I suspect it's a problem with Dreamhost's Passenger version again. My server (buenosaires) has Passenger 2.2.5. Latest Passenger version is 2.2.7.

    0 讨论(0)
  • 2020-12-05 21:53

    I think that at the moment the best would be to unfreeze everything and use what is on dreamhost. They have currently rails 2.3.4 and if you can wait a day or two - dreamhost is upgrading rails gems to 2.3.5 (it should have been upgraded already yesterday on 21st of december - but for some reason they didn't explain they are still on 2.3.4).

    0 讨论(0)
  • 2020-12-05 21:58

    You will almost always want to unpack the gems that your application depends on into the vendor folder. You can do that with this rake command:

    rake gems:unpack:dependencies
    

    This will create a folder vendor/gems under your application's root folder and unpack all of the gems that you declared with the config.gem command into it.

    This will not only solve your problem with mismatching rack versions, but also make sure that you are using the exact same versions of gems in production as you are using in development, which can prevent many potential headaches in the future.

    0 讨论(0)
  • 2020-12-05 22:02

    Dreamhost is updating Rack and Rails: http://www.dreamhoststatus.com/2009/12/21/ruby-gem-updates/

    I guess that solves it.

    0 讨论(0)
  • 2020-12-05 22:04

    A simple gem update of rack didn't work for me because it seems that Rails 2.3.5 wants Rack 1.0.1 specifically. So, when I did a gem update rack -v=1.0.1, Rails 2.3.5 started right up.

    0 讨论(0)
提交回复
热议问题