최근에 github에서 복제 한 프로젝트에 대한 작업을 시작했습니다. 내의 동료는 또한 프로젝트를 진행하고 서버를 시작하는 모든 문제가 발생하지 않는 것레일 서버를 시작하려고 할 때 구문 오류가 발생했습니다.
/Users/thomas/.rvm/gems/ruby-1.9.3-p194/gems/activesupport-3.2.3/lib/active_support/dependencies.rb:245:inload': /Users/thomas/Projects/BillingMiddleware/config/initializers/session_store.rb:3: syntax error, unexpected ':', expecting $end (SyntaxError) ...sion_store :cookie_store, key: '_BillingMiddleware_session' ^ from /Users/thomas/.rvm/gems/ruby-1.9.3-p194/gems/activesupport-3.2.3/lib/active_support/dependencies.rb:245:in
load' from /Users/thomas/.rvm/gems/ruby-1.9.3-p194/gems/activesupport-3.2.3/lib/active_support/dependencies.rb:236:inload_dependency' from /Users/thomas/.rvm/gems/ruby-1.9.3-p194/gems/activesupport-3.2.3/lib/active_support/dependencies.rb:245:in
load' from /Users/thomas/.rvm/gems/ruby-1.9.3-p194/gems/railties-3.2.3/lib/rails/engine.rb:588 from /Users/thomas/.rvm/gems/ruby-1.9.3-p194/gems/railties-3.2.3/lib/rails/engine.rb:587:ineach' from /Users/thomas/.rvm/gems/ruby-1.9.3-p194/gems/railties-3.2.3/lib/rails/engine.rb:587 from /Users/thomas/.rvm/gems/ruby-1.9.3-p194/gems/railties-3.2.3/lib/rails/initializable.rb:30:in
instance_exec' from /Users/thomas/.rvm/gems/ruby-1.9.3-p194/gems/railties-3.2.3/lib/rails/initializable.rb:30:inrun' from /Users/thomas/.rvm/gems/ruby-1.9.3-p194/gems/railties-3.2.3/lib/rails/initializable.rb:55:in
run_initializers' from /Users/thomas/.rvm/gems/ruby-1.9.3-p194/gems/railties-3.2.3/lib/rails/initializable.rb:54:ineach' from /Users/thomas/.rvm/gems/ruby-1.9.3-p194/gems/railties-3.2.3/lib/rails/initializable.rb:54:in
run_initializers' from /Users/thomas/.rvm/gems/ruby-1.9.3-p194/gems/railties-3.2.3/lib/rails/application.rb:136:ininitialize!' from /Users/thomas/.rvm/gems/ruby-1.9.3-p194/gems/railties-3.2.3/lib/rails/railtie/configurable.rb:30:in
send' from /Users/thomas/.rvm/gems/ruby-1.9.3-p194/gems/railties-3.2.3/lib/rails/railtie/configurable.rb:30:inmethod_missing' from /Users/thomas/Projects/BillingMiddleware/config/environment.rb:5 from /Users/thomas/.rvm/gems/ruby-1.9.3-p194/gems/activesupport-3.2.3/lib/active_support/dependencies.rb:251:in
require' from /Users/thomas/.rvm/gems/ruby-1.9.3-p194/gems/activesupport-3.2.3/lib/active_support/dependencies.rb:251:inrequire' from /Users/thomas/.rvm/gems/ruby-1.9.3-p194/gems/activesupport-3.2.3/lib/active_support/dependencies.rb:236:in
load_dependency' from /Users/thomas/.rvm/gems/ruby-1.9.3-p194/gems/activesupport-3.2.3/lib/active_support/dependencies.rb:251:inrequire' from /Users/thomas/Projects/BillingMiddleware/config.ru:4 from /Users/thomas/.rvm/gems/ruby-1.9.3-p194/gems/rack-1.4.1/lib/rack/builder.rb:51:in
instance_eval' from /Users/thomas/.rvm/gems/ruby-1.9.3-p194/gems/rack-1.4.1/lib/rack/builder.rb:51:ininitialize' from /Users/thomas/Projects/BillingMiddleware/config.ru:1:in
new' from /Users/thomas/Projects/BillingMiddleware/config.ru:1
: 나는 시도
매번 내가 다음과 같은 오류가 레일 서버를 시작합니다. 그는 루비, 레일 및 WeBrick과 동일한 버전의 것을 실행하고 있습니다.
key : : key =>에서 구문을 변경해 보았습니다.하지만 1.9.3 버전의 루비를 실행하고 있어도 문제가되지 않습니다. 나는 어쨌든 그 변경 한 경우 나 다른 오류 메시지가 :
/Users/thomas/.rvm/gems/ruby-1.9.3-p194/gems/activesupport-3.2.3/lib/active_support/dependencies.rb:245:in `load': /Users/thomas/Projects/BillingMiddleware/config/initializers/wrap_parameters.rb:8: syntax error, unexpected ':', expecting kEND (SyntaxError) wrap_parameters format: [:json] ^ from /Users/thomas/.rvm/gems/ruby-1.9.3-p194/gems/activesupport-3.2.3/lib/active_support/dependencies.rb:245:in `load' from /Users/thomas/.rvm/gems/ruby-1.9.3-p194/gems/activesupport-3.2.3/lib/active_support/dependencies.rb:236:in `load_dependency' from /Users/thomas/.rvm/gems/ruby-1.9.3-p194/gems/activesupport-3.2.3/lib/active_support/dependencies.rb:245:in `load' from /Users/thomas/.rvm/gems/ruby-1.9.3-p194/gems/railties-3.2.3/lib/rails/engine.rb:588 from /Users/thomas/.rvm/gems/ruby-1.9.3-p194/gems/railties-3.2.3/lib/rails/engine.rb:587:in `each' from /Users/thomas/.rvm/gems/ruby-1.9.3-p194/gems/railties-3.2.3/lib/rails/engine.rb:587 from /Users/thomas/.rvm/gems/ruby-1.9.3-p194/gems/railties-3.2.3/lib/rails/initializable.rb:30:in `instance_exec' from /Users/thomas/.rvm/gems/ruby-1.9.3-p194/gems/railties-3.2.3/lib/rails/initializable.rb:30:in `run' from /Users/thomas/.rvm/gems/ruby-1.9.3-p194/gems/railties-3.2.3/lib/rails/initializable.rb:55:in `run_initializers' from /Users/thomas/.rvm/gems/ruby-1.9.3-p194/gems/railties-3.2.3/lib/rails/initializable.rb:54:in `each' from /Users/thomas/.rvm/gems/ruby-1.9.3-p194/gems/railties-3.2.3/lib/rails/initializable.rb:54:in `run_initializers' from /Users/thomas/.rvm/gems/ruby-1.9.3-p194/gems/railties-3.2.3/lib/rails/application.rb:136:in `initialize!' from /Users/thomas/.rvm/gems/ruby-1.9.3-p194/gems/railties-3.2.3/lib/rails/railtie/configurable.rb:30:in `send' from /Users/thomas/.rvm/gems/ruby-1.9.3-p194/gems/railties-3.2.3/lib/rails/railtie/configurable.rb:30:in `method_missing' from /Users/thomas/Projects/BillingMiddleware/config/environment.rb:5 from /Users/thomas/.rvm/gems/ruby-1.9.3-p194/gems/activesupport-3.2.3/lib/active_support/dependencies.rb:251:in `require' from /Users/thomas/.rvm/gems/ruby-1.9.3-p194/gems/activesupport-3.2.3/lib/active_support/dependencies.rb:251:in `require' from /Users/thomas/.rvm/gems/ruby-1.9.3-p194/gems/activesupport-3.2.3/lib/active_support/dependencies.rb:236:in `load_dependency' from /Users/thomas/.rvm/gems/ruby-1.9.3-p194/gems/activesupport-3.2.3/lib/active_support/dependencies.rb:251:in `require' from /Users/thomas/Projects/BillingMiddleware/config.ru:4 from /Users/thomas/.rvm/gems/ruby-1.9.3-p194/gems/rack-1.4.1/lib/rack/builder.rb:51:in `instance_eval' from /Users/thomas/.rvm/gems/ruby-1.9.3-p194/gems/rack-1.4.1/lib/rack/builder.rb:51:in `initialize' from /Users/thomas/Projects/BillingMiddleware/config.ru:1:in `new' from /Users/thomas/Projects/BillingMiddleware/config.ru:1
피곤 완전히 제거하고 다시 설치 RVM, 루비를했습니다없이 우선 여러 번 레일. 나는 또한 도움이되지 않은 번들 설치를 실행 해 보았다.
누구에게 무슨 문제가 있는지 알 수 있습니까?
감사합니다.
이것은 문제의 빠른 해결 방법 인 것 같습니다. Ruby 1.9.3을 실행할 때 해쉬에 대한이 구문에 대해 불평하는 이유가 궁금합니다. – MalcolmDurling
당신은 여전히 시스템에서 루비 1.8.7을 사용하고 있습니다. 상상해보십시오. 행운을 빕니다. – Anil
새로운 구문이 있지만 이미 프로젝트에 커밋 된 코드가 많습니다. 프로젝트의 다른 구성원을 위해 작동 할 때 이전 구문으로 모든 것을 다시 변경하는 것처럼 보입니다. 이게 내가 할 수있는 다른 것인가? 루비 -v를 실행할 때 루비 1.9.3p194 (2012-04-20 수정 35410) [x86_64-darwin11.3.0] RVM을 사용할 때 rvm 목록 루비를 실행할 때 = * 루비 -1.9를 얻습니다. .3-p194 [x86_64] 나는 rvm use ruby-1.9.3-p194도 실행했는데 도움이되지 않았습니다. – MalcolmDurling