Pregunta

It looks like heroku is now defaulting to using ruby 2.0.0 out of the box when you upload a rails app.

One of my gems breaks due to some incompatibility issue that I don't really want to look into. The solution is of course to write ruby '1.9.2' or what have you in the Gemfile.

Problem is when running the server locally, ruby() is only recognized by heroku, not your local bundler and so I have to comment it out every time while starting a local server.

Is there a clever way around this that I am not aware of?

¿Fue útil?

Solución

Heroku's article about specifying ruby versions say this:

If you’re using a Bundler 1.1.4 or lower you’ll see the following error:

undefined method `ruby' for # (NoMethodError)

You’ll need to install bundler 1.2.0 or greater to use the ruby keyword.

I think you just need to update your local bundler to 1.2.0 or greater, as mine (1.3.5) recognize the ruby directive just fine as well.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top