I have cloned from my github account a repo, I am getting the following error, when i run bundle install. i cant understand the reason for it. The repo had been pushed from my pc and now i am cloning it to my laptop
An error occurred while installing sassc (2.2.1), and Bundler cannot continue.
Make sure that `gem install sassc -v '2.2.1' --source 'https://rubygems.org/'` succeeds before bundling.
In Gemfile:
sass-rails was resolved to 6.0.0, which depends on
sassc-rails was resolved to 2.1.2, which depends on
sassc
This is a known issue:
https://github.com/sass/sassc-ruby/issues/153
Solution:
add gem 'sassc', '~> 2.1.0' to your gemfile.
run bundle install
This will force it to use sassc version 2.1.0 which doesn't have the compile issue with Rails 6.
As a tip, whenever a gem fails to install or conflicts with another gem, it's a good idea to go check out the gem itself. 99% of the time, the code is on GitHub.
If you're new to this, try following these steps:
Gems in your gemfile come from https://rubygems.org by default, so visit that site and search for the gem exactly as it's named in your gemfile. In this case, it's here: https://rubygems.org/gems/sassc
On the gem's info page, find links on the righthand side. Click 'homepage'. For sassc, it takes you to this URL: https://github.com/sass/sassc-ruby
Click on the issues tab and look for anything related to the thing you're struggling with. In this case, I found about 3. Read through those issues and see if people have posted solutions or work-arounds.
Happy gem hunting!
Related
I've generated the app with "rails new" and switched to that directory but when I try to use "bundle install" I get
An error occurred while installing debug_inspector (0.0.2), and Bundler cannot
continue.
Make sure that gem install debug_inspector -v '0.0.2' succeeds before
bundling.
any suggestions?
I had the same problem with my rails application. I'm running with JRuby on my Windows machine and this is a common problem for Windows. I had to find the gem which included that gem as a dependency and remove it from my gem file.
In my case, there was a gem causing this name : gem 'web-console', '2.0.0.beta3' (probably an old version of the gem since it's a 1 year old project).
You probably need to comment some gem and try to bundle until it works.
If the gem is essential to the project, you will have to find a way to compile the gem for windows.
It may exist a way to check a tree of dependency to speed up the process.
This is a common error in older versions of ruby. Updating ruby version to 2.1.0 or later will fix this issue.
I'm working on a new project in Ruby, which I'm learning, and I need to install Sinatra gem and I'm getting the following error:
"Following gems were not installed: sinatra-sinatra (0.10.1): While
executing gem ... (Gem::UnsatisfiableDependencyError)
Unable to resolve dependency: 'sinatra-sinatra (= 0.10.1)' requires 'rack (>= 1.0)'"
Currently I'm using, RubyMine (Windows). Any help would be appreciated.
Thanks
The problem is not RubyMine, but some other dependency conflict in your app. The gem sinatra-sinatra requires Rack 1.0, there is probably another gem in your Gemfile that requires a greater or different version of the same gem.
Actually, I believe your problem can easily be fixed by using the proper gem. sinatra-sinatra is a very old gem, if you want to use the Sinatra framework the correct gem is sinatra. Update your Gemfile accordingly.
In you machine
gem install sinatra-sinatra
Check you Gemfile
gem 'sinatra-sinatra', '~> 0.10.1'
Delete the Gemfile.lock and bundle its once again.
I am trying to run "bundle install". It tries to install linecache19 version 0.5.13 which is not yet released. I can't find the linecache19 gem in Gemfile. Its getting installed as a dependency of some other gem. I would like to know what linecache19 gem is used for and who requires it.
You can run gem dependency GEMNAME on each of the gems in your gemfile (and possibly on their dependencies) to see who is requiring linecache19 0.5.13.
Maybe someone else will know of a way to search the whole dependency tree in one go.
This is probably very simple question.
Each time I do "Bundle install" in the folder of the project
I get an error like this
An error occured while installing json (1.6.6), and Bundler cannot continue.
Make sure that X succeeds before bundling.
where X can be
'gem install json -v '1.6.6'
or
'gem install execjs -v '1.3.2'
or
'gem install coffee-script -v '2.2.0'
Now, after I gradualy do each gem install manually the bundle install succeeds.
Is there a way to do them all in one command?
is there a way to do it in ruby mine?
That's what Bundler is supposed to do for you.
It looks like you have a problem with your Bundler or Ruby Install somewhere.
Without more information I can only suggest that you checkout the Bundler Troubleshooting page.
I've run into the same problem before if my network connection was an unstable/low bandwidth wireless connection. It tries to install all the gems at once, but stalls on one of them because of the lack of bandwidth. Then you can of course install one at a time maybe, but if your connection keeps going in and out this may be the cause of your inability to install them all at once.
It's possible that some of your gems aren't getting installed due to a bug related to using SSL connections. This would then mean that gems that depend on those gems throw an error like the one you experienced.
See: http://railsapps.github.com/openssl-certificate-verify-failed.html
That link has various workarounds, but the easiest is to replace this line:
source 'https://rubygems.org'
at the top of your Gemfile with this line:
source 'http://rubygems.org'
Is there anywhere that there are step by step instructions on how to install gems?
My google-fu is weak and those that I could find did not resolve my error.
My errors are detailed here:
Getting gcal4ruby gem to work
Basically my error sums up as:
gem installs properly and is detectable by,
but whenever I try to reference it in my application it just says:
Could not find 'gcal4ruby (= 0.0.5, runtime)' in any of the gem sources Try running 'bundle install'.
(* I tried bundle install -> no help *)
Your error states:
Could not find 'gcal4ruby (= 0.0.5, runtime)' in any of the gem sources Try running 'bundle install'.
It's looking for 0.0.5 of gcal4ruby, which you don't have installed, rather you're saying yourself that the gem list -d shows:
gcal4ruby (0.5.5)
Which is not the correct version. I would recommend attempting to discover what's trying to require this older version of gcal4ruby. I think it's in your Gemfile, but I have been known to be wrong occasionally.
If this answer doesn't solve your question, then please attach the errors you're getting and your Gemfile to your question.
As a guess, you are using rails 3? Rails 3 uses a project called bundler for dependencies, so instead of installing the gem in your system ruby, add gem 'gcal4ruby to the Gemfile in the root of your app. after that, a bundle install will install the gem locally into your app.
Bundler means that rails 3 apps have their gems completely isolated from the system gems. Even if the gem is installed in the system, it will not be accessible in the app.