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.
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 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.
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.
Ruby is so darn mysterious when it comes to using the gems! Where do these gems reside?? In java, you can have as many jars you want just include them in your CLASSPATH and your good to go. Ruby is a simpler language, but why do I need the headache of dealing with simple crap? Can anyone seriously finally explain how the gem loading process works? It seems like no one really knows why the heck do requiring some gems work, and requiring others doesn't even if you have gem installed them and they are in the gem list. Where is the authority in ruby on this site that can finally clarify the gem loading process.
I am tried of including 'rubygems' in my ruby scripts to prevent errors like LoadError: no such file to load -- pony
And even when I do require 'rubygems' in my scripts, it still gives LoadErrors. Even if the gem is in my gem list.
When you're using Bundler to manage Gems in your project (you will have a Gemfile at the root directory of the project), be sure to run
bundle install
requiring rubygems just loads rubygems itself (and isn't required in ruby 1.9 and above)
You need to actually load each gem individually via require.
If you use bundler, then you can optionally have bundle auto require everything from your Gemfile
I need to read ID3 tags from MP3 files, so i did some research and found that rtaglib is the way to go. The other plugins seems outdated, i tried them anyways but none of them work for me.
After installed the rtaglib gem (the ruby binding for TagLib http://developer.kde.org/~wheeler/taglib.html#bindings) i just can't make it work.
I tried adding both the gem to the gemfile and install it with sudo gem install rtaglib. I get the response like it's installed, but after that when i tried to require any of the two files i get:
?> require 'tagfile/tagfile'
LoadError: no such file to load -- tagfile/tagfile
from /Library/Ruby/Gems/1.8/gems/activesupport-3.0.0/lib/active_support/dependencies.rb:239:in require'
from /Library/Ruby/Gems/1.8/gems/activesupport-3.0.0/lib/active_support/dependencies.rb:239:inrequire'
Or if i tried TagLib:
require 'TagLib'
=> nil
I have tried to move the files manually from the zip file but that doesn't zip to work neither.
Thank you.
If you are using Ubuntu you must install libtagc0-dev first, THEN install the gem.
At first I made the mistake of installing libtag1-dev, which gave me the same problem as you have.
Make sure that you are including rubygems as well.
If you are doing this from a Rake task or ruby script:
require 'rubygems'
require 'tagfile/tagfile'
I am doing this on OSX with the gem and taglib installed via homebrew and it works fine.