Make bundler use different gems for different platforms

后端 未结 9 1415
甜味超标
甜味超标 2020-11-29 02:06

I\'m working on upgrading one of our Rails 2.3.8 apps to Rails 3, and have run into an annoying problem with bundler and deployment. I develop the application on a Windows m

相关标签:
9条回答
  • 2020-11-29 02:31

    I came across this issue and then ended up writing script for this painful task. http://gouravtiwari.blogspot.com/2011/03/development-on-windows-deploying-to.html

    0 讨论(0)
  • 2020-11-29 02:34

    Have you tried using rvm (link here)? It can install isolated Ruby Virtual Machines and Gemsets, so you can work with an environment more like the one you have in production. I honestly don't know if it will solve your problems, but it's worth a shot.

    Anyway, I know this is not the answer you want to hear, but IMHO Windows is not the best platform use when developing in Rails. I recently bought a MacBook mainly to develop Rails applications, it saves you from a lot of headaches. You can also install Linux on your development machine and use it, it's way better than using Windows ports or Cygwin.

    0 讨论(0)
  • 2020-11-29 02:36

    Don't commit Gemfile.lock and your gems to production. You have to run bundler install again in production.

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