简体   繁体   中英

Rails generate not working in a mountable engine

I am using a blog engine from github- blogo.

I am unable to run the scripts rails generate or bundle.

rails g model usdf /home/raj/.rvm/rubies/ruby-2.1.5/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:54:in ``require': cannot load such file -- rails/cli (LoadError) from /home/raj/.rvm/rubies/ruby-2.1.5/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:54:in ``require' from /usr/bin/rails:9:in ' `

This is the error I am getting.It doesnt have a bin directory inside the app. But even when I add bin directory from another engine , the problem persists.The error I get is.

bin/rails g model nnsssnf /home/raj/.rvm/rubies/ruby-2.1.5/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:54:in ``require': cannot load such file -- bundler/setup (LoadError) from /home/raj/.rvm/rubies/ruby-2.1.5/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:54:in ``require' from bin/rails:9:in '`

Can anyone help with this?

You are lacking the rails gem. Try installed it first.

gem install rails

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM