I tried to add docx-html gem to my project and here's what I get while bundle install:
Bundler could not find compatible versions for gem "rubyzip": In
Gemfile:
zip-zip (>= 0) ruby depends on
rubyzip (>= 1.0.0) ruby
docx-html (>= 0) ruby depends on
docx (~> 0.1.0) ruby depends on
rubyzip (0.9.1)
Part of my Gemfile:
gem 'rubyzip'
gem 'zip-zip'
gem 'docx_replace'
I added the line gem 'zip-zip' by an advice from another StackOverflow question. If I exclude it, instead of bundle install error I get the following error while trying to start the server:
`require': cannot load such file -- zip
How do I get rid of these errors while keeping gem docx_replace?
I haven't yet figured out why, but for some reason changing Gemfile code to this worked:
gem 'zip'
gem 'docx_replace'
Related
I have a ruby script that needs to run on Lambda, I created a function, with all the files in a folder
When I test it, got an error:
"errorMessage": "Could not find public_suffix-3.0.2 in any of the sources"
I already add this library in Gemfile.lock, so I am confused why this is happening and how do I fix it?
This is how I defined it in Gemfile.lock:
GEM
remote: https://rubygems.org/
specs:
addressable (2.5.2)
public_suffix (>= 2.0.2, < 4.0)
.......
It seems as that your public_suffix versions don't match.
Add to your Gemfile.
gem 'public_suffix', '~> 3.0', '>= 3.0.2'
Run bundle install
Make sure that the version is upgraded in your Gemfile.lock and add folder to Lambda.
I am trying to update to the latest google vision, and so I add in Gemfile:
gem 'google-cloud-vision', '~> 0.28.0'
But when I run bundle install, I get the following error:
Bundler could not find compatible versions for gem "faraday": In
Gemfile:
google-cloud-vision (~> 0.28.0) ruby depends on
google-cloud-core (~> 1.2) ruby depends on
google-cloud-env (~> 1.0) ruby depends on
faraday (~> 0.11) ruby
forecast_io (>= 0) ruby depends on
faraday (0.9.2)
I tried using the latest version of forecast too:
gem 'forecast_io', '~> 2.0', '>= 2.0.2'
I understand that two different gems require two different versions of faraday. But isn't bundler supposed to resolve this?
According to bundler documentation
Update the gems specified (all gems, if none are specified), ignoring the previously installed gems specified in the Gemfile.lock. In general, you should use bundle install(1) to install the same exact gems and versions across machines.
You would use bundle update to explicitly update the version of a gem.
So use bundle update google-cloud-vision for update gem to new version.
I'm getting this error when trying to install bundle. I have both versions '0.15.4' and '0.25.1' of gem excon in my gemset. How can I fix this?
Bundler could not find compatible versions for gem "excon":
In Gemfile:
mandrill-api (>= 0) ruby depends on
excon (~> 0.15.4) ruby
fog (~> 1.10.1) ruby depends on
excon (0.25.1)
I deleted my Gemfile.lock, if that doesn't work try running gem update excon and check that you have the version installed with gem list | grep excon for the correct version.
Given the age of this, I suspect you have likely found an answer. That said, I think if you update fog you should have better luck. Sorry for the difficulty.
I am trying to install the gem melomel for testing in actionscript. When i require it in my gemfile and bundle update, i get an error saying that it cant find the gem tenderlove-frex and outputs this message:
Could not find gem 'tenderlove-frex (>= 0) ruby', which is required by gem 'spree (>= 0) ruby', in any of the sources.Bundler could not find compatible versions for gem "nokogiri":
In Gemfile:
spree (>= 0) ruby depends on
nokogiri (~> 1.5.0) ruby
spree (>= 0) ruby depends on
nokogiri (1.0.0)
When i remove melomel form my gemfile, bundle updates fine. I have looked all over online and it seems like every location where its been hosted has removed the gem.
Where can I get this gem? i am using ruby 1.9.3.
The frex gem is not hosted on the typical Gemcutter.
To get it, add GitHub to your gem sources:
gem sources -a http://gems.github.com
Then try installing the gem as usual:
gem install tenderlove-frex
In case it's helpful: tenderlove is the handle of Aaron Patterson, one of the top Ruby developers, and as far as I know he's replaced frex and likely has a better solution you can use. For example, can you update your Nokogiri gem to the current version, and also your Spree gem to the current version? This should remove the need for frex.
To see your versions:
$ gem list melomel
melomel (0.6.6)
$ gem list spree
spree (1.2.2)
spree_api (1.2.2)
spree_cmd (1.2.2)
spree_core (1.2.2)
spree_dash (1.2.2)
spree_promo (1.2.2)
spree_sample (1.2.2)
To update:
$ bundle update
To see dependency list for Nokogiri:
$ gem dependency nokogiri
I'm trying to install the yob pdf reader: https://github.com/yob/pdf-reader#readme
My script has the following code:
reader = PDF::Reader.new("1.pdf")
when I run that script I get the following error:
`initialize': wrong number of arguments (1 for 0) (ArgumentError)
Which doesn't make any sense because the directions say this should be done this way.
How do I solve this?
p.s.
gem list command produces:
*** LOCAL GEMS ***
Ascii85 (1.0.1)
bundler (1.0.18)
columnize (0.3.4)
linecache (0.46)
nokogiri (1.5.0)
pdf-reader (0.10.0)
rbx-require-relative (0.0.5)
rdoc (3.9.4, 2.5.11)
rdoc-data (2.5.3)
ruby-debug (0.10.4)
ruby-debug-base (0.10.4)
rudebug (0.3.2)
syntax (1.0.0)
gem -v produces: 1.3.7
You most likely have a gem version conflict. You can specify the version of the gem that you want to require, in case you have multiple versions installed:
require 'rubygems'
gem 'pdf-reader', "~> 0.10.0"
require 'pdf-reader'
Update
I would slap myself if I could. There's nothing wrong with your setup. The instructions to use PDF::Reader.new "my_file.pdf" are for the git version.
Check the examples directory for the version 0.10.0 to get examples of how to use the library.