我正在尝试“自动”使用Rails_app_composer,来自指定参数的默认文件。
我用来从默认值生成应用程序:
$ rails_apps_composer new lamevapp --defaults=my_defaults.yaml
my_defaults.yaml是
recipes:
- setup
- readme
- gems
- testing
- email
- models
- controllers
- views
- routes
- frontend
- database
- extras
prefs:
:dev_webserver: webrick
:prod_webserver: same
:database: sqlite
:templates: erb
:unit_test: rspec
:integration: cucumber
:fixtures: factory_girl
:frontend: none
:form_builder: none
:email: gmail
:authentication: devise
:devise_modules: default
:authorization: none
gems:
- heroku
- nokogiri
- kaminari
args:
:skip_test_unit: yes
:skip_active_record: false
但我做错了,因为我收到了这个错误:
home/joan/.rvm/gems/ruby-2.1.5@lamevapp/gems/activesupport-4.1.8/lib/active_support/ordered_hash.rb:3:in `<top (required)>': undefined method `add_builtin_type' for Psych:Module (NoMethodError)
from /home/joan/.rvm/rubies/ruby-2.1.5/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:69:in `require'
from /home/joan/.rvm/rubies/ruby-2.1.5/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:69:in `require'
from /home/joan/.rvm/gems/ruby-2.1.5@lamevapp/gems/rails_apps_composer-3.0.29/lib/rails_wizard/config.rb:1:in `<top (required)>'
from /home/joan/.rvm/rubies/ruby-2.1.5/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:69:in `require'
from /home/joan/.rvm/rubies/ruby-2.1.5/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:69:in `require'
from /home/joan/.rvm/gems/ruby-2.1.5@lamevapp/gems/rails_apps_composer-3.0.29/lib/rails_wizard/recipe.rb:1:in `<top (required)>'
from /home/joan/.rvm/rubies/ruby-2.1.5/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:69:in `require'
from /home/joan/.rvm/rubies/ruby-2.1.5/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:69:in `require'
from /home/joan/.rvm/gems/ruby-2.1.5@lamevapp/gems/rails_apps_composer-3.0.29/lib/rails_wizard.rb:2:in `<top (required)>'
from /home/joan/.rvm/rubies/ruby-2.1.5/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:69:in `require'
from /home/joan/.rvm/rubies/ruby-2.1.5/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:69:in `require'
from /home/joan/.rvm/gems/ruby-2.1.5@lamevapp/gems/rails_apps_composer-3.0.29/lib/rails_wizard/command.rb:1:in `<top (required)>'
from /home/joan/.rvm/rubies/ruby-2.1.5/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:69:in `require'
from /home/joan/.rvm/rubies/ruby-2.1.5/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:69:in `require'
from /home/joan/.rvm/gems/ruby-2.1.5@lamevapp/gems/rails_apps_composer-3.0.29/bin/rails_apps_composer:5:in `<top (required)>'
from /home/joan/.rvm/gems/ruby-2.1.5@lamevapp/bin/rails_apps_composer:23:in `load'
from /home/joan/.rvm/gems/ruby-2.1.5@lamevapp/bin/rails_apps_composer:23:in `<main>'
from /home/joan/.rvm/gems/ruby-2.1.5@lamevapp/bin/ruby_executable_hooks:15:in `eval'
from /home/joan/.rvm/gems/ruby-2.1.5@lamevapp/bin/ruby_executable_hooks:15:in `<main>'
我该如何解决?感谢