2015-06-21 104 views
1

我试图运行rspec,但出现以下错误。运行麻烦rspec

/Users/xy/.rvm/rubies/ruby-1.9.3-p551/lib/ruby/gems/1.9.1/gems/bundler-1.9.4/lib/bundler.rb:317: warning: Insecure world writable dir /usr/local/bin in PATH, mode 040777 
/Users/xy/.rvm/rubies/ruby-1.9.3-p551/lib/ruby/gems/1.9.1/gems/bundler-1.9.4/lib/bundler.rb:317: warning: Insecure world writable dir /usr/local/bin in PATH, mode 040777 
You are using Curb 0.7.10. WebMock supports version >= 0.7.16. 
DEPRECATION WARNING: ActiveSupport::Memoizable is deprecated and will be removed in future releases,simply use Ruby memoization pattern instead. (called from extend at /Users/xy/ht-webapp12/config/initializers/mysql2_column_cache.rb:3) 
/Users/xy/.rvm/rubies/ruby-1.9.3-p551/lib/ruby/gems/1.9.1/gems/mysql2-0.3.11/lib/mysql2/client.rb:44:in `connect': Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2) (Mysql2::Error) 

有谁知道如何解决它?

+0

你可以用Gemfile和Gemfile.lock的内容更新问题吗? – rorra

回答

1

尝试:

bundle exec rspec 

问题是,如果你不捆rspec的运行,它将使用最新的系统库也可以有你在你的项目捆绑在一起的一个不同的版本


在阅读你的答案后,更新你的Gemfile以使路缘大于0.7.16,当我看到你的GemfileGemfile.lock后,我可以给你正确的方向。

但是你应该检查Gemfile.lock的内容,并检查curb正在加载哪个版本,只需检查依赖它的库并更新这些库,这将更新你的路边石,否则你可以添加作为gemfile与desider版本的要求,其他库可能会停止,但你应该能够解决冲突。

如果您不想使用这些方法中的任何一种,只需将rspec降级到早期版本,该版本适用于旧版本的路边石膏。

+0

我的确使用bundle exec rspec运行 –

+0

你可以用Gemfile和Gemfile.lock的内容更新问题吗? – rorra

+0

我不行。但是为什么rspec甚至需要sql,因为fixture已经有了样本数据? –