我有使用 Erb 作为模板引擎和 Mongoid 作为 Object-Document-Mapper 的 Padrino 项目女巫。
我正在尝试通过以下命令为我的 Padrino 项目创建管理应用程序
padrino g admin -e erb
但我收到一个错误
/home/vadim/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/psych.rb:297:in `initialize': No such file or directory - /home/vadim/projects/interierka/heroku/.components (Errno::ENOENT)
from /home/vadim/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/psych.rb:297:in `open'
from /home/vadim/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/psych.rb:297:in `load_file'
from /home/vadim/.rvm/gems/ruby-1.9.3-p194/gems/padrino-gen-0.10.7/lib/padrino-gen/generators/actions.rb:120:in `retrieve_component_config'
from /home/vadim/.rvm/gems/ruby-1.9.3-p194/gems/padrino-gen-0.10.7/lib/padrino-gen/generators/actions.rb:101:in `store_component_choice'
from /home/vadim/.rvm/gems/ruby-1.9.3-p194/gems/padrino-admin-0.10.7/lib/padrino-admin/generators/admin_app.rb:53:in `create_admin'
from /home/vadim/.rvm/gems/ruby-1.9.3-p194/gems/thor-0.15.4/lib/thor/task.rb:27:in `run'
from /home/vadim/.rvm/gems/ruby-1.9.3-p194/gems/thor-0.15.4/lib/thor/invocation.rb:120:in `invoke_task'
from /home/vadim/.rvm/gems/ruby-1.9.3-p194/gems/thor-0.15.4/lib/thor/invocation.rb:126:in `block in invoke_all'
from /home/vadim/.rvm/gems/ruby-1.9.3-p194/gems/thor-0.15.4/lib/thor/invocation.rb:126:in `each'
from /home/vadim/.rvm/gems/ruby-1.9.3-p194/gems/thor-0.15.4/lib/thor/invocation.rb:126:in `map'
from /home/vadim/.rvm/gems/ruby-1.9.3-p194/gems/thor-0.15.4/lib/thor/invocation.rb:126:in `invoke_all'
from /home/vadim/.rvm/gems/ruby-1.9.3-p194/gems/thor-0.15.4/lib/thor/group.rb:238:in `dispatch'
from /home/vadim/.rvm/gems/ruby-1.9.3-p194/gems/thor-0.15.4/lib/thor/base.rb:425:in `start'
from /home/vadim/.rvm/gems/ruby-1.9.3-p194/gems/padrino-gen-0.10.7/lib/padrino-gen/generators/cli.rb:51:in `setup'
from /home/vadim/.rvm/gems/ruby-1.9.3-p194/gems/thor-0.15.4/lib/thor/task.rb:27:in `run'
from /home/vadim/.rvm/gems/ruby-1.9.3-p194/gems/thor-0.15.4/lib/thor/invocation.rb:120:in `invoke_task'
from /home/vadim/.rvm/gems/ruby-1.9.3-p194/gems/thor-0.15.4/lib/thor/invocation.rb:126:in `block in invoke_all'
from /home/vadim/.rvm/gems/ruby-1.9.3-p194/gems/thor-0.15.4/lib/thor/invocation.rb:126:in `each'
from /home/vadim/.rvm/gems/ruby-1.9.3-p194/gems/thor-0.15.4/lib/thor/invocation.rb:126:in `map'
from /home/vadim/.rvm/gems/ruby-1.9.3-p194/gems/thor-0.15.4/lib/thor/invocation.rb:126:in `invoke_all'
from /home/vadim/.rvm/gems/ruby-1.9.3-p194/gems/thor-0.15.4/lib/thor/group.rb:238:in `dispatch'
from /home/vadim/.rvm/gems/ruby-1.9.3-p194/gems/thor-0.15.4/lib/thor/base.rb:425:in `start'
from /home/vadim/.rvm/gems/ruby-1.9.3-p194/gems/padrino-gen-0.10.7/bin/padrino-gen:16:in `<main>'
我正在尝试创建 .components 文件,但出现另一个错误
/home/vadim/.rvm/gems/ruby-1.9.3-p194/gems/padrino-gen-0.10.7/lib/padrino-gen/generators/actions.rb:102:in `store_component_choice': undefined method `[]=' for false:FalseClass (NoMethodError)
from /home/vadim/.rvm/gems/ruby-1.9.3-p194/gems/padrino-admin-0.10.7/lib/padrino-admin/generators/admin_app.rb:53:in `create_admin'
from /home/vadim/.rvm/gems/ruby-1.9.3-p194/gems/thor-0.15.4/lib/thor/task.rb:27:in `run'
from /home/vadim/.rvm/gems/ruby-1.9.3-p194/gems/thor-0.15.4/lib/thor/invocation.rb:120:in `invoke_task'
from /home/vadim/.rvm/gems/ruby-1.9.3-p194/gems/thor-0.15.4/lib/thor/invocation.rb:126:in `block in invoke_all'
from /home/vadim/.rvm/gems/ruby-1.9.3-p194/gems/thor-0.15.4/lib/thor/invocation.rb:126:in `each'
from /home/vadim/.rvm/gems/ruby-1.9.3-p194/gems/thor-0.15.4/lib/thor/invocation.rb:126:in `map'
from /home/vadim/.rvm/gems/ruby-1.9.3-p194/gems/thor-0.15.4/lib/thor/invocation.rb:126:in `invoke_all'
from /home/vadim/.rvm/gems/ruby-1.9.3-p194/gems/thor-0.15.4/lib/thor/group.rb:238:in `dispatch'
from /home/vadim/.rvm/gems/ruby-1.9.3-p194/gems/thor-0.15.4/lib/thor/base.rb:425:in `start'
from /home/vadim/.rvm/gems/ruby-1.9.3-p194/gems/padrino-gen-0.10.7/lib/padrino-gen/generators/cli.rb:51:in `setup'
from /home/vadim/.rvm/gems/ruby-1.9.3-p194/gems/thor-0.15.4/lib/thor/task.rb:27:in `run'
from /home/vadim/.rvm/gems/ruby-1.9.3-p194/gems/thor-0.15.4/lib/thor/invocation.rb:120:in `invoke_task'
from /home/vadim/.rvm/gems/ruby-1.9.3-p194/gems/thor-0.15.4/lib/thor/invocation.rb:126:in `block in invoke_all'
from /home/vadim/.rvm/gems/ruby-1.9.3-p194/gems/thor-0.15.4/lib/thor/invocation.rb:126:in `each'
from /home/vadim/.rvm/gems/ruby-1.9.3-p194/gems/thor-0.15.4/lib/thor/invocation.rb:126:in `map'
from /home/vadim/.rvm/gems/ruby-1.9.3-p194/gems/thor-0.15.4/lib/thor/invocation.rb:126:in `invoke_all'
from /home/vadim/.rvm/gems/ruby-1.9.3-p194/gems/thor-0.15.4/lib/thor/group.rb:238:in `dispatch'
from /home/vadim/.rvm/gems/ruby-1.9.3-p194/gems/thor-0.15.4/lib/thor/base.rb:425:in `start'
from /home/vadim/.rvm/gems/ruby-1.9.3-p194/gems/padrino-gen-0.10.7/bin/padrino-gen:16:in `<main>'