2013-04-08 34 views
1

我正在嘗試設置此https://github.com/jamesu/tubehub項目並獲取此錯誤。 我也嘗試了所有的東西並用Google搜索,但這並沒有幫助。rake db:schema:migrate error

[email protected]:/var/www/synch# bundle exec rake db:schema:load --trace 
The source :rubygems is deprecated because HTTP requests are insecure. 
Please change your source to 'https://rubygems.org' if possible, or 'http://rubygems.org' if not. 
** Invoke db:schema:load (first_time) 
** Invoke environment (first_time) 
** Execute environment 
rake aborted! 
/var/www/synch/util.rb:8: undefined (?...) sequence: /^(.*?)((?<!&)#|\#)(.*)$/ 
/var/www/synch/util.rb:9: undefined (?...) sequence: /(?:\#)(?<!&#)(?:\#)*(.*)$/ 
/usr/lib/ruby/gems/1.8/gems/activesupport-3.2.11/lib/active_support/dependencies.rb:251:in `require' 
/usr/lib/ruby/gems/1.8/gems/activesupport-3.2.11/lib/active_support/dependencies.rb:251:in `require' 
/usr/lib/ruby/gems/1.8/gems/activesupport-3.2.11/lib/active_support/dependencies.rb:236:in `load_dependency' 
/usr/lib/ruby/gems/1.8/gems/activesupport-3.2.11/lib/active_support/dependencies.rb:251:in `require' 
/var/www/synch/core.rb:37 
/var/www/synch/core.rb:36:in `each' 
/var/www/synch/core.rb:36 
/var/www/synch/Rakefile:2:in `require' 
/var/www/synch/Rakefile:2 
/usr/lib/ruby/gems/1.8/gems/rake-10.0.3/lib/rake/task.rb:228:in `call' 
/usr/lib/ruby/gems/1.8/gems/rake-10.0.3/lib/rake/task.rb:228:in `execute' 
/usr/lib/ruby/gems/1.8/gems/rake-10.0.3/lib/rake/task.rb:223:in `each' 
/usr/lib/ruby/gems/1.8/gems/rake-10.0.3/lib/rake/task.rb:223:in `execute' 
/usr/lib/ruby/gems/1.8/gems/rake-10.0.3/lib/rake/task.rb:166:in `invoke_with_call_chain' 
/usr/lib/ruby/1.8/monitor.rb:242:in `synchronize' 
/usr/lib/ruby/gems/1.8/gems/rake-10.0.3/lib/rake/task.rb:159:in `invoke_with_call_chain' 
/usr/lib/ruby/gems/1.8/gems/rake-10.0.3/lib/rake/task.rb:187:in `invoke_prerequisites' 
/usr/lib/ruby/gems/1.8/gems/rake-10.0.3/lib/rake/task.rb:185:in `each' 
/usr/lib/ruby/gems/1.8/gems/rake-10.0.3/lib/rake/task.rb:185:in `invoke_prerequisites' 
/usr/lib/ruby/gems/1.8/gems/rake-10.0.3/lib/rake/task.rb:165:in `invoke_with_call_chain' 
/usr/lib/ruby/1.8/monitor.rb:242:in `synchronize' 
/usr/lib/ruby/gems/1.8/gems/rake-10.0.3/lib/rake/task.rb:159:in `invoke_with_call_chain' 
/usr/lib/ruby/gems/1.8/gems/rake-10.0.3/lib/rake/task.rb:152:in `invoke' 
/usr/lib/ruby/gems/1.8/gems/rake-10.0.3/lib/rake/application.rb:143:in `invoke_task' 
/usr/lib/ruby/gems/1.8/gems/rake-10.0.3/lib/rake/application.rb:101:in `top_level' 
/usr/lib/ruby/gems/1.8/gems/rake-10.0.3/lib/rake/application.rb:101:in `each' 
/usr/lib/ruby/gems/1.8/gems/rake-10.0.3/lib/rake/application.rb:101:in `top_level' 
/usr/lib/ruby/gems/1.8/gems/rake-10.0.3/lib/rake/application.rb:110:in `run_with_threads' 
/usr/lib/ruby/gems/1.8/gems/rake-10.0.3/lib/rake/application.rb:95:in `top_level' 
/usr/lib/ruby/gems/1.8/gems/rake-10.0.3/lib/rake/application.rb:73:in `run' 
/usr/lib/ruby/gems/1.8/gems/rake-10.0.3/lib/rake/application.rb:160:in `standard_exception_handling' 
/usr/lib/ruby/gems/1.8/gems/rake-10.0.3/lib/rake/application.rb:70:in `run' 
/usr/lib/ruby/gems/1.8/gems/rake-10.0.3/bin/rake:33 
/usr/bin/rake:23:in `load' 
/usr/bin/rake:23 
Tasks: TOP => db:schema:load => environment 

我是紅寶石的完全noob;抱歉,愚蠢的問題。

+0

您好insci,不要道歉,當我們遇到問題或者我們只是解決它時,我們都是noobs! :)看起來你運行的是Ruby 1.8,當你運行1.9或2.0時更好。你可以在命令行運行'ruby -v'來確認,並告訴我們你正在運行哪個操作系統?你是否使用像RVM/Rbenv/chruby等Ruby管理器? – iain 2013-04-08 20:15:03

+0

@iain'ruby -v' =>'ruby 1.8.7(2010-08-16 patchlevel 302)[i486-linux]'。我正在運行debian squeeze。不,我不使用紅寶石管理器。謝謝。 – insci 2013-04-08 20:19:08

+0

我建議你看看[RVM](https://rvm.io/)或[chruby](https://github.com/postmodern/chruby),但你可以通過'sudo apt-get install來安裝1.9 ruby1.9.1'。很可能還有其他的ruby可以使用,所以請嘗試'apt-cache search ruby​​'(或者其他的,我暫時沒有使用Apt/Linux)。然後確保您使用的是新版本,然後重新運行tubehub項目的安裝。 – iain 2013-04-08 22:31:07

回答

0

我剛剛複製你的問題,並可以確認它是一個紅寶石版本問題。使用1.8.7-p375會出現問題。使用Ruby版本1.9.3-p545,該命令運行得很好。項目維護者應該在他們的項目中指定一個ruby版本,我會提交一個github的問題來澄清這個問題。其他答案也提到了這一點;用你最喜歡的方法升級你的紅寶石,我建議rbenv

相關問題