我们有一个开发人员在使用 zsh 时遇到了 gem 错误,但我们其他人仍然想使用 gem。有没有好的解决方案?
问问题
113 次
1 回答
2
From here, add the following code to the bottom of your gemfile.
gemfile_local = File.join(File.dirname(__FILE__), 'Gemfile.local')
if File.readable?(gemfile_local)
puts "Loading #{gemfile_local}..." if $DEBUG
instance_eval(File.read(gemfile_local))
end
Have each of the developers who want to use the problem gem to add it to their Gemfile.local. This is the most elegant solution I have found for using gems you don't want to commit to version control. Don't forget to add Gemfile.local to your .gitignore.
于 2013-11-12T18:36:58.233 回答