-1

我遇到了 Rails 应用程序的水族馆语法问题。它是我从我推送到的 github 存储库中克隆的一个应用程序,它运行良好。我是唯一一个推送更新的人

=========================

这是我尝试运行 rails 时遇到的错误

/Users/jcollyer/.rvm/gems/ruby-1.9.3-p327/gems/activesupport-3.0.10/lib/active_support/dependencies.rb:239:in require': /Users/jcollyer/.rvm/gems/ruby-1.9.3-p327/gems/aquarium-0.3.0/lib/aquarium/aspects/exclusion_handler.rb:34: syntax error, unexpected ':', expecting keyword_then or ',' or ';' or '\n' (SyntaxError) when String: type_or_object.name.eql?(t) ^ /Users/jcollyer/.rvm/gems/ruby-1.9.3-p327/gems/aquarium-0.3.0/lib/aquarium/aspects/exclusion_handler.rb:35: syntax error, unexpected keyword_when, expecting keyword_end when Symbol: type_or_object.name.eql?(t.to_s) ^ /Users/jcollyer/.rvm/gems/ruby-1.9.3-p327/gems/aquarium-0.3.0/lib/aquarium/aspects/exclusion_handler.rb:36: syntax error, unexpected keyword_when, expecting keyword_end when Regexp: type_or_object.name =~ t ^ /Users/jcollyer/.rvm/gems/ruby-1.9.3-p327/gems/aquarium-0.3.0/lib/aquarium/aspects/exclusion_handler.rb:37: syntax error, unexpected keyword_else, expecting keyword_end else type_or_object == t ^ /Users/jcollyer/.rvm/gems/ruby-1.9.3-p327/gems/aquarium-0.3.0/lib/aquarium/aspects/exclusion_handler.rb:61: syntax error, unexpected keyword_end, expecting $end from /Users/jcollyer/.rvm/gems/ruby-1.9.3-p327/gems/activesupport-3.0.10/lib/active_support/dependencies.rb:239:inblock in require' 来自 /Users/jcollyer/.rvm/ gems/ruby-1.9.3-p327/gems/activesupport-3.0.10/lib/active_support/dependencies.rb:225:in block in load_dependency' from /Users/jcollyer/.rvm/gems/ruby-1.9.3-p327/gems/activesupport-3.0.10/lib/active_support/dependencies.rb:593:innew_constants_in' 来自 /Users/jcollyer/.rvm/gems/ruby-1.9.3-p327/ gems/activesupport-3.0.10/lib/active_support/dependencies.rb:225:in load_dependency' from /Users/jcollyer/.rvm/gems/ruby-1.9.3-p327/gems/activesupport-3.0.10/lib/active_support/dependencies.rb:239:inrequire' 来自 /Users/jcollyer/.rvm/gems/ruby-1.9.3-p327/gems/aquarium-0.3.0/lib/ aquarium/aspects/aspect.rb:5:in <top (required)>' from /Users/jcollyer/.rvm/gems/ruby-1.9.3-p327/gems/activesupport-3.0.10/lib/active_support/dependencies.rb:239:inrequire' 来自 /Users/jcollyer/.rvm/gems/ruby-1.9.3-p327/gems/activesupport-3.0.10/lib/active_support/dependencies.rb:239:在block in require' from /Users/jcollyer/.rvm/gems/ruby-1.9.3-p327/gems/activesupport-3.0.10/lib/active_support/dependencies.rb:225:in来自 /Users/jcollyer/.rvm/gems/ruby-1.9.3-p327/gems/activesupport-3.0.10/lib/active_support/dependencies.rb:593:in 的 load_dependency 块中new_constants_in' from /Users/jcollyer/.rvm/gems/ruby-1.9.3-p327/gems/activesupport-3.0.10/lib/active_support/dependencies.rb:225:inload_dependency' 来自 /Users/jcollyer/.rvm/gems/ruby-1.9.3-p327/gems/activesupport-3.0.10/lib/active_support/dependencies.rb:239:in require' from /Users/jcollyer/.rvm/gems/ruby-1.9.3-p327/gems/aquarium-0.3.0/lib/aquarium/aspects.rb:2:in'来自 /Users/jcollyer/.rvm/ gems/ruby-1.9.3-p327/gems/activesupport-3.0.10/lib/active_support/dependencies.rb:239:in require' from /Users/jcollyer/.rvm/gems/ruby-1.9.3-p327/gems/activesupport-3.0.10/lib/active_support/dependencies.rb:239:inblock in require' 来自 /Users/jcollyer/.rvm/gems/ruby-1.9.3- p327/gems/activesupport-3.0.10/lib/active_support/dependencies.rb:225:in block in load_dependency' from /Users/jcollyer/.rvm/gems/ruby-1.9.3-p327/gems/activesupport-3.0.10/lib/active_support/dependencies.rb:593:innew_constants_in' 来自 /Users/jcollyer/.rvm/gems/ruby-1.9.3-p327/gems/activesupport-3.0.10/ lib/active_support/dependencies.rb:225:in load_dependency' from /Users/jcollyer/.rvm/gems/ruby-1.9.3-p327/gems/activesupport-3.0.10/lib/active_support/dependencies.rb:239:inrequire' 来自 /Users/jcollyer/.rvm/gems/ruby-1.9.3-p327/gems/aquarium-0.3.0/lib/aquarium.rb:5:in <top (required)>' from /Users/jcollyer/.rvm/gems/ruby-1.9.3-p327@global/gems/bundler-1.2.1/lib/bundler/runtime.rb:68:inrequire ' 来自 /Users/jcollyer/.rvm/gems/ruby-1.9.3-p327@global/gems/bundler-1.2.1/lib/bundler/runtime.rb:68:inblock (2 levels) in require' from /Users/jcollyer/.rvm/gems/ruby-1.9.3-p327@global/gems/bundler-1.2.1/lib/bundler/runtime.rb:66:in来自 /Users/jcollyer/.rvm/gems/ruby-1.9.3-p327@global/gems/bundler-1.2.1/lib/bundler/runtime.rb:66:in block in require' from /Users/jcollyer/.rvm/gems/ruby-1.9.3-p327@global/gems/bundler-1.2.1/lib/bundler/runtime.rb:55:ineach' 来自 /Users/jcollyer/ .rvm/gems/ruby-1.9.3-p327@global/gems/bundler-1.2.1/lib/bundler/runtime.rb:55:in require' from /Users/jcollyer/.rvm/gems/ruby-1.9.3-p327@global/gems/bundler-1.2.1/lib/bundler.rb:128:inrequire' 来自 /Users/jcollyer/Documents/projects/hughes/hughes_cms/ Funeral-Homes/config/application.rb:7:in <top (required)>' from /Users/jcollyer/.rvm/gems/ruby-1.9.3-p327/gems/railties-3.0.10/lib/rails/commands.rb:28:inrequire' 来自 /Users/jcollyer/.rvm/gems/ruby-1.9.3-p327/gems/railties-3.0.10/lib/rails/commands.rb: 28:in block in <top (required)>' from /Users/jcollyer/.rvm/gems/ruby-1.9.3-p327/gems/railties-3.0.10/lib/rails/commands.rb:27:intap' 来自 /Users/jcollyer/.rvm/gems/ruby-1.9.3-p327/gems/railties-3.0.10/lib/rails/commands.rb:27:in <top (required)>' from script/rails:6:inrequire' 来自脚本/rails: 6:在`'

我的宝石文件

来源“http://rubygems.org”

  • 宝石'导轨','3.0.10'
  • 宝石'sqlite3'
  • 宝石'mysql2','< 0.3'
  • 宝石“设计”
  • gem '简单导航'
  • gem '回形针', '~> 2.4'
  • 宝石'jquery-rails','> = 1.0.12'
  • 宝石'galetahub-simple_captcha',需要:“simple_captcha”
  • gem 'will_paginate', '~> 3.0'
  • 宝石“水族馆”
  • 宝石“元搜索”

组 :test, :development do - gem "rspec-rails", "~> 2.6" - gem "autotest" - gem 'factory_girl' end

4

1 回答 1

1

指定水族宝石的版本

gem "aquarium", "~> 0.5.1"

ruby 1.9.3 仅支持 0.5.1 版本

V0.5.1(2012 年 5 月 1 日):现在支持 Ruby 1.9.3 和 JRuby 1.6.7。

来源 http://aquarium.rubyforge.org/

或者我应该说这个应用程序使用 ruby​​-1.8.7 而不是 ruby​​-1.9.3。因为 rails 3.0 可能与 ruby​​-1.9.3 不兼容

于 2012-12-27T18:58:55.283 回答