Rails 4 - cannot load such file -- rich (LoadError) - After removing gem from gemfile - ruby-on-rails

I've removed a gem from my gemfile (specifically this gem). I've run bundle update. I can't start the server or migrate db because of this error I now get: /lib/active_support/dependencies.rb:229:in `require': cannot load such file -- rich (LoadError)

I've had trouble removing this gem as well. Simply run a search in your application to find all references to the gem and remove them. Unfortunately I wasn't able to find any other way other than manual removal.

Related

Getting error cannot load such file -- dry/types/compat/form_types (LoadError) while updating bundle in my project

Getting error
/home/sachin/.rvm/gems/ruby-2.3.4/gems/activesupport-4.2.11.1/lib/active_support/dependencies.rb:274:in `require': cannot load such file -- dry/types/compat/form_types (LoadError)
While trying 'bundle update' in one of my project.
i have gem 'dry-validation' in my Gemfile
please let me know what is causing this issue because before bundle update it was working fine but now i can not start my rails project.
After commenting the below code it's working fine.
require 'reform/form/dry'
Reform::Form.class_eval do
include Reform::Form::Dry
end
I'm not entirely sure what versions of the gems you are using but this might be your problem.
https://github.com/trailblazer/reform/issues/500
I used the following in my gemfile, to solve the issue i had. Hopefully version 2.3.0 will be released soon.
gem 'reform', github: 'trailblazer/reform', branch: 'v2.3.0.rc2'
Also as a side note, when using 'dry-validation' make sure NOT to use the gem reform-rails as stated in the readme

Error when loading caldav-icloud gem

I have installed the caldav-icloud gem. Then I've required it in my environment.rb
require "caldav-icloud"
But if I do rails s I get this error:
/lib/ruby/gems/2.2.0/gems/activesupport-4.2.5.1/lib/active_support/dependencies.rb:274:in `require': cannot load such file -- caldav-icloud (LoadError)
How can I solve it?
Thanks
To make any gem available to your Rails app, you have to add it to the Gemfile like this:
gem "caldav-icloud"
It is not enough to just install it.
This answer goes into a bit more detail what bundler and the Gemfile do and why this is required.

Add rb-grib gem to Rails application

I'm new to Rails and I got a problem.
My new project requires rb-grib gem (link to ruby gems: https://rubygems.org/gems/rb-grib/versions/0.2.2). This gem requires GRIB API library, I installed it using brew install grib-api. It works in irb and .rb scripts. I need to use it in my Rails app, but I get an error LoadError: cannot load such file -- numru/grib. What I need to do to make it work and deploy to Heroku in future?
You need to add
require 'numru/grib'

Gem can be required in IRB but not by Rails

When I add
require 'soundcloud'
in Rails and start the server using
rails server
I get
...rb:9:in `require': cannot load such file -- soundcloud (LoadError)
the same yields
=> true
in IRB.
I installed Ruby, Rails, etc following http://installrails.com/.
Any ideas what could be causing this?
Why don't you use Bundler?
Add to Gemfile:
gem 'soundcloud'
then run
bundle install
in the root of your project and it all should work automatically.

Can not manage to launch the site with sinatra

I have a small problem with sinatra.
I recovered a project made ​​Sinatra, and I made a bundle install just that all goes well but when I made ​​a
ruby app.rb
well, he told me
kernel_require.rb:110:in `require': cannot load such file -- sass (LoadError)
I do not understand the problem or just because it is well require 'sass'
thanks you
Try:
gem install sass
in the terminal; it's a gem for working with a different kinds of CSS.
Also see http://sass-lang.com/ for information about what it is.

Resources