I'm developing a Rails 3.1, and am using the default uglifier asset gem. That gem depends on execjs, which requires a JavaScript runtime. I develop on Mac OSX, so I never had trouble with it. Another developer uses Linux, which doesn't have a JavaScript runtime by default. So using therubyracer, a JavaScript runtime embedded in Ruby, works quite fine, but I'd like Bundler to install it only if the system is Linux. Can I specify this in the Gemfile so it'll only install in Linux and not Mac?
you can do;
gem 'rb-fsevent', :require => false if RUBY_PLATFORM =~ /darwin/i
replacing the gem and the platform with appropriate ones in your case.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With