2016-11-24 18 views
0

mongify數據庫配置。configuration.rb:14:在`instance_eval的':(EVAL):16:語法錯誤,意想不到的結束輸入,期望在CentOS

而在終端mongify check database.config運行的命令,我收到以下錯誤。

/home/hcdc/.gem/ruby/gems/mongify-1.3.1/lib/mongify/configuration.rb:14:in `instance_eval': (eval):16: syntax error, unexpected end-of-input, expecting keyword_end (SyntaxError) 
from /home/hcdc/.gem/ruby/gems/mongify-1.3.1/lib/mongify/configuration.rb:14:in `parse' 
from /home/hcdc/.gem/ruby/gems/mongify-1.3.1/lib/mongify/cli/options.rb:78:in `config_file' 
from /home/hcdc/.gem/ruby/gems/mongify-1.3.1/lib/mongify/cli/options.rb:58:in `parse' 
from /home/hcdc/.gem/ruby/gems/mongify-1.3.1/lib/mongify/cli/application.rb:27:in `execute!' 
from /home/hcdc/.gem/ruby/gems/mongify-1.3.1/bin/mongify:15:in `<top (required)>' 
from /usr/local/bin/mongify:23:in `load' 
from /usr/local/bin/mongify:23:in `<main>' 

我database.config文件

sql_connection do 
    adapter  "mysql" 
    host  "10.208.35.134" 
    username "root" 
    password "hcdc123" 
    database "test" 
    batch_size 10000   
# This is defaulted to 10000 but in case you want to make that smaller (on lower RAM machines) end 

mongodb_connection do 
    host  "localhost" 
    database "test" 
end 
+1

請,改善你的問題。給它一個合適的標題。以清楚而合乎邏輯的方式寫出第一句話,以便更快地理解它。 – Tom

+0

sql_connection中沒有結尾 –

回答

3
sql_connection do 
    adapter  "mysql" 
    host  "10.208.35.134" 
    username "root" 
    password "hcdc123" 
    database "test" 
    batch_size 10000   
    # This is defaulted to 10000 but in case you want to make that smaller (on lower RAM machines) 
end # <<< this must be in a new line 

mongodb_connection do 
    host  "localhost" 
    database "test" 
end 
相關問題