2015-06-21 118 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已經有了樣本數據? –