我目前正在使用guard ieguard-coffeescript gem 在我的OSX 开发系统上编译我的javascript(将来我可能会添加更多的保护任务)。我将rb-fsevent
gem 添加到我的 Gemspec 中,现在我看到在很多 Gemspecs 中添加了这样的 if 语句:
gem 'rb-fsevent', :require => false if RUBY_PLATFORM =~ /darwin/i
尝试部署到我在 Linux 下运行的登台/生产环境,在服务器上执行的脚本使用bundle install --deployment
以下异常的结果:
# bundle install --deployment
You have modified your Gemfile in development but did not check
the resulting snapshot (Gemfile.lock) into version control
You have deleted from the Gemfile:
* rb-fsevent
有没有办法解决这个问题,还是我只需要删除 if 以便我可以部署到我的系统,然后安装一个在非 OSX 平台上无用的 gem?
--
编辑:我bundle install
在部署到我的登台环境之前运行并bundle check
在第一次失败后运行。我在删除 if 语句后让它运行了..