2016-07-21 50 views
0

我有我鄰SX 10.10.5運行Rails應用程序當我嘗試運行軌道服務器我得到這個錯誤:Rails應用程序無法正常工作 - 精極度緊張::語法錯誤:(<unknown>)

Psych::SyntaxError: (<unknown>): found unexpected end of stream while scanning a quoted scalar at line 14 column 82 
          parse at org/jruby/ext/psych/PsychParser.java:227 
         parse_stream at /Users/fariedpatel1/.rvm/rubies/jruby-9.0.5.0/lib/ruby/stdlib/psych.rb:376 
          parse at /Users/fariedpatel1/.rvm/rubies/jruby-9.0.5.0/lib/ruby/stdlib/psych.rb:324 
           load at /Users/fariedpatel1/.rvm/rubies/jruby-9.0.5.0/lib/ruby/stdlib/psych.rb:251 
          parse at /Users/fariedpatel1/.rvm/gems/[email protected]/gems/figaro-1.1.1/lib/figaro/application.rb:60 
     block in raw_configuration at /Users/fariedpatel1/.rvm/gems/[email protected]/gems/figaro-1.1.1/lib/figaro/application.rb:56 
           call at org/jruby/RubyProc.java:318 
          default at org/jruby/RubyHash.java:712 
           [] at org/jruby/RubyHash.java:1100 
       raw_configuration at /Users/fariedpatel1/.rvm/gems/[email protected]/gems/figaro-1.1.1/lib/figaro/application.rb:56 
       global_configuration at /Users/fariedpatel1/.rvm/gems/[email protected]/gems/figaro-1.1.1/lib/figaro/application.rb:64 
        configuration at /Users/fariedpatel1/.rvm/gems/[email protected]/gems/figaro-1.1.1/lib/figaro/application.rb:32 
           each at /Users/fariedpatel1/.rvm/gems/[email protected]/gems/figaro-1.1.1/lib/figaro/application.rb:42 
           load at /Users/fariedpatel1/.rvm/gems/[email protected]/gems/figaro-1.1.1/lib/figaro/application.rb:36 
           load at /Users/fariedpatel1/.rvm/gems/[email protected]/gems/figaro-1.1.1/lib/figaro.rb:23 
        block in Railtie at /Users/fariedpatel1/.rvm/gems/[email protected]/gems/figaro-1.1.1/lib/figaro/rails/railtie.rb:5 
           call at org/jruby/RubyProc.java:318 
         execute_hook at /Users/fariedpatel1/.rvm/gems/[email protected]/gems/activesupport-4.2.7/lib/active_support/lazy_load_hooks.rb:36 
      block in run_load_hooks at /Users/fariedpatel1/.rvm/gems/[email protected]/gems/activesupport-4.2.7/lib/active_support/lazy_load_hooks.rb:45 
           each at org/jruby/RubyArray.java:1560 
        run_load_hooks at /Users/fariedpatel1/.rvm/gems/[email protected]/gems/activesupport-4.2.7/lib/active_support/lazy_load_hooks.rb:44 
        run_load_hooks! at /Users/fariedpatel1/.rvm/gems/[email protected]/gems/railties-4.2.7/lib/rails/application.rb:148 
          instance at /Users/fariedpatel1/.rvm/gems/[email protected]/gems/railties-4.2.7/lib/rails/application.rb:96 
          config at /Users/fariedpatel1/.rvm/gems/[email protected]/gems/railties-4.2.7/lib/rails/railtie.rb:123 
       <class:Application> at /Users/fariedpatel1/Documents/Maestrano/connector/config/application.rb:11 
       <module:Connector> at /Users/fariedpatel1/Documents/Maestrano/connector/config/application.rb:10 
          <top> at /Users/fariedpatel1/Documents/Maestrano/connector/config/application.rb:9 
          require at org/jruby/RubyKernel.java:937 
          (root) at /Users/fariedpatel1/.rvm/gems/[email protected]/gems/railties-4.2.7/lib/rails/commands/commands_tasks.rb:1 
require_application_and_environment! at /Users/fariedpatel1/.rvm/gems/[email protected]/gems/railties-4.2.7/lib/rails/commands/commands_tasks.rb:141 
          console at /Users/fariedpatel1/.rvm/gems/[email protected]/gems/railties-4.2.7/lib/rails/commands/commands_tasks.rb:67 
          <top> at /Users/fariedpatel1/.rvm/gems/[email protected]/gems/railties-4.2.7/lib/rails/commands/commands_tasks.rb:39 
         require at org/jruby/RubyKernel.java:937 
          <top> at bin/rails:4 

我的Gemfile:

ruby '2.2.3', :engine => 'jruby', :engine_version => '9.0.5.0' 
source 'https://rubygems.org' 

gem 'rails', '~> 4.2.6' 
gem 'turbolinks', '~> 2.5' 
gem 'jquery-rails' 
gem 'puma' 
gem 'tzinfo-data', platforms: [:mingw, :mswin, :jruby] 
gem 'uglifier', '>= 1.3.0' 
gem 'maestrano-connector-rails' 
Object.send :remove_const, :Config 
Config = RbConfig 
group :production, :uat do 
    gem 'activerecord-jdbcpostgresql-adapter', platforms: :jruby 
    gem 'pg', platforms: :ruby 
    gem 'rails_12factor' 
end 

group :test, :develpment do 
    gem 'activerecord-jdbcsqlite3-adapter', platforms: :jruby 
    gem 'sqlite3', platforms: :ruby 
end 

group :test do 
    gem 'simplecov' 
    gem 'rspec-rails' 
    gem 'factory_girl_rails' 
    gem 'shoulda-matchers' 
    gem 'timecop' 
end 

我使用jruby 9.0.5.0 (2.2.3) 2016-01-26 7bee00d Java HotSpot(TM) 64-Bit Server VM 25.45-b02 on 1.8.0_45-b14 +jit [darwin-x86_64] 和Rails 4.2.7

請讓我知道如果您需要更多關於我的設置的任何其他信息起來。我有很多問題設置了這個。我之前的錯誤顯示我需要將配置更改爲RB配置,因此您可以看到我將它包含在我的gemfile中,並且該特定錯誤已消失。

+0

聽起來像一個在一個yml文件中的語法錯誤(也許與figaro有關) –

+0

謝謝你的回答。我重新安裝了figaro,它已經擺脫了那個錯誤,並留下了一個新的 - NameError:未初始化的常量ActiveSupport :: EventedFileUpdateChecker –

回答

0

你只是在你的figaro.yml配置中有一個語法錯誤(檢查你的配置)。

你可以嘗試解析該文件以驗證其有效:MRI下

require 'yaml'; YAML.load File.read('config/figaro.yml')

...這不是一個JRuby的具體問題,你可以通過確認啓動-ING

+0

謝謝你的回答。我重新安裝了figaro,它擺脫了那個錯誤,並且給我留下了一個新名字 - NameError:未初始化的常量ActiveSupport :: EventedFileUpdateChecker –

+0

如果你的q被回答而不是接受答案。答案並不是一個專門的支持論壇,只要他們滿意,他們就會問問題:)最好! – kares

+0

今天早上,我在MRI下重新啓動並完成了完美的作品。對不起,我對堆棧溢出很陌生。 –

相關問題