Bundler error on deployment

前端 未结 3 1803
天涯浪人
天涯浪人 2021-02-01 22:50

I\'m currently using guard i.e. guard-coffeescript gem to compile my javascript (and in the future I\'ll probably add some more guard tasks) on my OSX dev system. I added the

相关标签:
3条回答
  • 2021-02-01 22:57

    I had a similar problem. If you're using capistrano you can set the following option:

    set :bundle_without, [:darwin, :development, :test]
    

    Then wrap your gem 'rb-fsevent' line in a group called darwin. Something like this should work nicely:

    group :test, :darwin do
      gem 'rb-fsevent'
    end
    

    This makes bundler do this on the server:

    bundle --without darwin development test
    

    Which means that it ignores those groups in the Gemfile.lock. What you were doing would make you OS X machine and your server come up with different resulting lock files. Which is why it was complaining.

    0 讨论(0)
  • 2021-02-01 23:01

    As described in

    https://github.com/guard/guard

    the solution is simply

    group :development do
      gem 'rb-inotify', :require => false
      gem 'rb-fsevent', :require => false
      gem 'rb-fchange', :require => false
    end
    
    0 讨论(0)
  • 2021-02-01 23:08

    I had the exact same issue and Luke's solution fixed it for me, however, only after I removed the :require => false if RUBY_PLATFORM =~ /darwin/i string that is commonly used.

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