Error Creating Scaffold Resources
source link: https://www.codesd.com/item/error-creating-scaffold-resources.html
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
Error Creating Scaffold Resources
I try to execute the following command:
rails generate scaffold Micropost content:string user id:integer
After executing the following command the following error messages are coming:
/usr/local/lib/ruby/2.0.0/rubygems/dependency.rb:296:in `to_specs': Could not find 'railties' (>= 0) among 13 total gem(s) (Gem::LoadError)
from /usr/local/lib/ruby/2.0.0/rubygems/dependency.rb:307:in `to_spec'
from /usr/local/lib/ruby/2.0.0/rubygems/core_ext/kernel_gem.rb:47:in `gem'
from /usr/local/bin/rails:22:in `<main>'
But before that I have executed another such statement to create a resource named User. This ran successfully. I am new to Rails. I have no idea about the error. Can anyone help me to fix that? Thank you.
You probably need to run the bundle install
command.
This command should be run after every changes you make in the file named Gemfile
at the root of your Rails project. The Gemfile
is the place where you'll want to declare all your applications dependencies (gems).
Please have a look here for more details.
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK