Says that if I develop a Ruby on Rails application using Rails 2.3.2 will it usually be Passenger compatible at my hosting company?

says if I develop a Ruby on Rails application using Rails 2.3.2 will it usually be Passenger compatible on my hosting company?

If I ssh to my hosting company and type rails -v I get 2.2.2 ... so it looks like they might be using Rails 2.2.2.

So if I developed a Rails app on my Macbook and ftp all the files are there, will Passenger generally work well with the generated code with the current version of Rails?

-1


a source to share


3 answers


Fix rails in suppliers / rails using the built-in rail task. This way, your application will use the version of rails you want, no matter where you deploy it.

rake rails:freeze:gems

      

And the easiest way to do a specific version that I know of.

rake rails:freeze:edge RELEASE=2.3.2.1

      

Now your version of rails will go with you where you submit your application.



You can unpack other gem dependencies into vendor / gems for whatever gem you use and want to make sure it's available wherever you deploy your application.

rake gems:unpack

      

And to ensure their dependencies:

rake gems:unpack:dependencies

      

I also suggest that you check that they have the latest version of the passenger installed.

+2


a source


I would check the Passenger version they installed (or confirm that it is installed at all). I also suggest you freeze the Rails version.



+1


a source


Just a second something for railsninja's answer.

First tell me it won't work right away.

Is this the vps host for you or sudo access in some way?

If yes, I suggest you do a rake: install instead of gems: unpack, because some of the gems depend on os (e.g. Rcov, RedCloth ... etc.)

I will ask the hosting company for their configuration for passengers, the important question will be whether they are using RailsSpawnMethod: smart or smart-lv2 (default). If they are using the smart method then it is best to freeze your gems and otherwise the rails will have a compatible issue as you can find a link to the user guide for the RailsSpawnMethod user.

It will be almost 100% compatible if you freeze your gems (all gems must be correctly declared in environment.rb using config.gem, for example (config.gem 'will_paginate' ,: source => " http: // gems.github.com ")) and RAILS !!!!!

0


a source







All Articles