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.
Related
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
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.
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.
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.
I just installed the formatastic-bootstrap gem for Ruby on Rails and Twitter Bootstrap. Per the readme file, I added *= require formtastic-bootstrap to application.css, I created a file called config/initializers/formtastic.rb whose contents are Formtastic::Helpers::FormHelper.builder = FormtasticBootstrap::FormBuilder, and I ran bundle install. When I try to start my rails server now, I get the following error.
/Users/wrightgd/.rvm/gems/ruby-1.9.3-p0/gems/formtastic-bootstrap-1.1.1/lib/formtastic-bootstrap/helpers/buttons_helper.rb:5:in
`': cannot load such file --
formtastic/helpers/buttons_helper (LoadError)
What am I doing wrong here? Thank you in advance for the help!
According to this latest version of formtastic is not compatible with formtastic-bootstrap. Try older version gem 'formtastic', " ~> 2.1.1"