我安装了gem koudoku并使用命令rails g koudoku:install user
我收到错误。我做了一个搜索,无法找到它的修复程序。我不知道该怎么做。如果有人有一些有用的建议!
generate model
/Users/.rvm/rubies/ruby-2.0.0-p353/bin/ruby: No such file or directory -- bin/rails (LoadError)
gsub app/models/subscription.rb
generate model
/Users/.rvm/rubies/ruby-2.0.0-p353/bin/ruby: No such file or directory -- bin/rails (LoadError)
gsub app/models/plan.rb
generate model coupon code:string free_trial_length:string
/Users/.rvm/rubies/ruby-2.0.0-p353/bin/ruby: No such file or directory -- bin/rails (LoadError)
gsub app/models/coupon.rb
/Users/.rvm/gems/ruby-2.0.0-p353/gems/thor-0.18.1/lib/thor/actions/file_manipulation.rb:232:in `binread': No such file or directory - /Users/dating/app/models/coupon.rb (Errno::ENOENT)
from /Users/.rvm/gems/ruby-2.0.0-p353/gems/thor-0.18.1/lib/thor/actions/file_manipulation.rb:232:in `gsub_file'
from /Users/.rvm/gems/ruby-2.0.0-p353/gems/koudoku-0.0.11/lib/generators/koudoku/install_generator.rb:50:in `install'
from /Users/.rvm/gems/ruby-2.0.0-p353/gems/thor-0.18.1/lib/thor/command.rb:27:in `run'
from /Users/.rvm/gems/ruby-2.0.0-p353/gems/thor-0.18.1/lib/thor/invocation.rb:120:in `invoke_command'
from /Users/.rvm/gems/ruby-2.0.0-p353/gems/thor-0.18.1/lib/thor/invocation.rb:127:in `block in invoke_all'
from /Users/.rvm/gems/ruby-2.0.0-p353/gems/thor-0.18.1/lib/thor/invocation.rb:127:in `each'
from /Users/.rvm/gems/ruby-2.0.0-p353/gems/thor-0.18.1/lib/thor/invocation.rb:127:in `map'
from /Users/.rvm/gems/ruby-2.0.0-p353/gems/thor-0.18.1/lib/thor/invocation.rb:127:in `invoke_all'
from /Users/.rvm/gems/ruby-2.0.0-p353/gems/thor-0.18.1/lib/thor/group.rb:233:in `dispatch'
from /Users/.rvm/gems/ruby-2.0.0-p353/gems/thor-0.18.1/lib/thor/base.rb:439:in `start'
from /Users/.rvm/gems/ruby-2.0.0-p353/gems/railties-4.0.0.rc1/lib/rails/generators.rb:156:in `invoke'
from /Users/.rvm/gems/ruby-2.0.0-p353/gems/railties-4.0.0.rc1/lib/rails/commands/generate.rb:11:in `<top (required)>'
from /Users/.rvm/gems/ruby-2.0.0-p353/gems/activesupport-4.0.0.rc1/lib/active_support/dependencies.rb:228:in `require'
from /Users/.rvm/gems/ruby-2.0.0-p353/gems/activesupport-4.0.0.rc1/lib/active_support/dependencies.rb:228:in `block in require'
from /Users/.rvm/gems/ruby-2.0.0-p353/gems/activesupport-4.0.0.rc1/lib/active_support/dependencies.rb:213:in `load_dependency'
from /Users/.rvm/gems/ruby-2.0.0-p353/gems/activesupport-4.0.0.rc1/lib/active_support/dependencies.rb:228:in `require'
from /Users/.rvm/gems/ruby-2.0.0-p353/gems/railties-4.0.0.rc1/lib/rails/commands.rb:51:in `<top (required)>'
from script/rails:6:in `require'
from script/rails:6:in `<main>'
答案 0 :(得分:0)
正如Kirti Thorat在评论中指出的那样,我必须首先创建模型,然后运行生成器。