why Ruby on Rails Scaffolding Fails - ruby-on-rails

i'm trying to make an scaffofold on rails V 5.2.1 but i have the following error
i already tried gem pristine --all
but not works thanks any help please

Try bundle install..
The error which I could see in scaffold is Rails couldn't find the gem nokogiri .. make sure that your gemfile has the gem and then try running it

Related

Rails 4 - Bundle error for obfuscate_id gem

I am trying to $bundle install the obfuscate_id gem into my Rails 4 application, but I am coming across an error:
It says it's dependent on Rails > 3.2.1, but I have Rails 4.0.2. Am I wrong in assuming this should work? Have I missed something?
The gem: https://github.com/namick/obfuscate_id
Thanks,
Michael.
I had the same issue. RubyGems doesn't seem to have the most recent version, so I installed the gem from Github, which resolved it. Put the following code in your file:
gem 'obfuscate_id', :git => 'https://github.com/namick/obfuscate_id.git'

Installing Cucumber with rails generate

I've tried to do:
rails generate cucumber:install —rspec —capybara
but I'm getting the following error:
Could not find generator cucumber:install.
I've included my Gemfile here http://pastebin.com/cDryD448 - bundle install and bundle update have both been run, as has gem update.
It's rails 3.1.0.
You are missing the gem 'cucumber-rails' line :)

spree error message in Rails

I am new to ruby on rails. I installed ruby and gems both on my ubuntu 10.10 system. My rails -v is 3.0.5 and gem -v is 1.3.7. As my requirement I installed bundler and after that when I installed spree by the command gem install spree I got the following error message:
ERROR: Error installing spree:
spree_core requires will_paginate (= 3.0.pre2, runtime)
I googled many hours but didn't find any good result. So please help me.I am really a newbie in Rails.
Have you tried the following?
gem update --system
gem install will_paginate -v=3.0.pre2 --pre
gem install spree
You tell it manually to install the correct required version of will_paginate. Maybe that helps. Good luck.
This should all work through bundler. Have you added the spree gem to your Gemfile and run bundle install? Are you using RVM? Post the results of bundle list and rvm info(if applicable) if you're still having problems

Rails 3.0.3, rails_admin gem, generator not found

I am getting error installing Rails_admin with rails 3.0.3. Command line log shown below -
C:\rorprj\app>gem uninstall rails_admin
Successfully uninstalled rails_admin-0.0.0
C:\rorprj\app>gem install rails_admin
Temporarily enhancing PATH to include DevKit...
Successfully installed rails_admin-0.0.0 1 gem installed
Installing ri documentation for rails_admin-0.0.0...
Installing RDoc documentation for rails_admin-0.0.0...
C:\rorprj\app>rails generate rails_admin:install_admin
**Could not find generator rails_admin:install_admin.**
C:\rorprj\app>rails -v
Rails 3.0.3
Anything I can do fix this?
Try this
gem 'rails_admin', :git => 'git://github.com/sferik/rails_admin.git'
Sometimes the actual github repo has an different version. I have it running on 3.0.3 and that is what is in my gemfile.
If you call
rails generate rails_admin
the 'help' returns
*Hello, to install rails_admin into your app you need to ru*n:
rake rails_admin:install
And this works. I just encountered the same problem as you. (Keep in mind that you need to add the gem to the gemfile too)
Did you add this gem to your Gemfile? This file is responsible for loading all gems that your application depends on, and if this gem isn't specified in it then it will not be loaded.

Gem Server and Rails RDoc Not Found

I would like to read Rails documentation locally though gem server.
I go to http://localhost:8808/ and Rails 2.3.3 gem is in the list of the gems installed, but when I click [rdoc] I get:
`/doc_root/rails-2.3.3/rdoc/index.html' not found.
I tried to uninstall and reinstall Rails but I got no effect.
All other gems work properly, why I can't see Rails documentation?
Rails itself has no documentation while you can read rdocs about actionmailer, actionpack, activerecord, activeresource or activesupport.
You can try to explicitly generate ri and rdoc during gem installation. The command is as follows:
$ sudo gem install rails --rdoc --ri
Cheers
http://railsapi.com/
Just download this to your gem docs dir.

Resources