bundle install mongoid, mongoid_ext error - ruby

I get this error when I run bundle install to install Shapado. What does it mean? and how to fix it?
Could not find gem 'mongoid (~> 3) ruby', which is required by gem 'mongoid_ext (>= 0) ruby', in any of the sources.

We cannot provide exact answers unless you show us your Gemfile. In the meantime, you can try to
Check your Gemfile for typos (missing commas, additional spaces inside the gem names)
Delete Gemfile.lock and run bundle install again
When i download the latest version of shapado and try to bundle install i get a similar error, but for the twitter gem:
Could not find twitter-1.7.2 in any of the sources
It seems Shapado is a bit out of date and has not seen any commits for quite a while…

Related

Unresolved specs during Gem::Specification.reset:

When launching Guard, I'm getting this output:
$ guard
WARN: Unresolved specs during Gem::Specification.reset:
lumberjack (>= 1.0.2)
ffi (>= 0.5.0)
WARN: Clearing out unresolved specs.
Please report a bug if this causes problems.
What does this mean, and how do I fix it?
Contents of Guardfile:
guard 'livereload' do
watch(%r{.+\.(css|js|html)$})
end
guard 'sass', :input => 'css', :style => :compressed, :extension => '.min.css'
I was seeing this issue by just running RSpec on its own. From what I understand, this means that you have more than one version of the listed gems installed on your system, and RSpec is unsure which one to use. After uninstalling older version of the gems, the warnings went away.
You can try:
gem cleanup lumberjack
Or:
gem list lumberjack
gem uninstall lumberjack
If you're using Bundler, you can try bundle exec guard (or in my case bundle exec rspec).
Using the following command solved it for me:
bundle clean --force
See guard-and-unresolved-specs for more info
Use Bundler. Call bundle exec guard, not guard.
FYI:
gem cleanup
worked for me.
$ gem cleanup
Cleaning up installed gems...
Attempting to uninstall builder-3.2.2
Successfully uninstalled builder-3.2.2
Attempting to uninstall amatch-0.3.0
Successfully uninstalled amatch-0.3.0
Attempting to uninstall tins-1.12.0
Successfully uninstalled tins-1.12.0
Clean Up Complete
This worked for me:
bundle clean --force
then
bundle install
to reinstall gems.
I use gem list gem-name; gem uninstall gem-name to clean the gem one by one because of the dependency. After that, the error does not show again.
add
'bundle exec'
before your command.
I use ruby 2.4 and got the same problem when deploying jekyll on windows, it fixed.
I was getting this message while running Rspec within a Guard plugin gem, using bundle exec rspec. It turned out to be a missing line in the gemspec file:
$:.push File.expand_path("../lib", __FILE__)
This line is normally at the top of the file (in many of the gems I have recently been working in) and I had commented it out to see why.
Remember, if you want to use guard, you have to add gem guard to Gemfile.
group :developement, :test do
gem 'guard'
end
Then, run
bundle install
I hope this can help you.
If anyone has come this far and still hasn't found the answer I leave you with this. gem update --system. I tried all of these other answers to no avail. Hopefully this works for you.
Try gem uninstall <gem>
and it will remove all younger versions of gem.
You will then be asked
"If you remove this gem, these dependencies will not be met. Continue
deleting? [YN]"
Select the answer
"no"
to leave the latest version of gem and all dependencies remain valid.

JRuby: Nokogiri 1.6 Failing To Install & Bundler Attempting To Install Already Met Dependency

I am getting an error on jruby (linux) when installing the
"trinidad_diagnostics_extension" gem (though this question is not about trinidad). A chain of dependencies is
generating the error:
"trinidad_diagnostics_extension" depends on "jruby-lint >= 0.3.0"
"jruby-lint >= 0.3.0" in turn depends on "nokogiri >= 1.5.0.beta.4"
Before attempting to install "trinidad_diagnostics_extension", the relevant
part of my gem list looks like this:
$gem list
nokogiri (1.5.9 java)
jruby-lint (0.4.1)
As you can see, the needed dependencies seem already to be met. Nonetheless,
after adding gem 'trinidad_diagnostics_extension' to my Gemfile and then
running jruby -S bundle install, the bundler attempts to install nokogiri
(1.6.0.rc1), and during this installation fails with the following error:
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.
... bunch of omitted output here
nokogiri.c:42:18: fatal error: util.h: No such file or directory
compilation terminated.
make: *** [nokogiri.o] Error 1
Gem files will remain installed in /home/jg/.rvm/gems/jruby-1.7.3/gems/nokogiri-1.6.0.rc1 for inspection.
Results logged to /home/jg/.rvm/gems/jruby-1.7.3/gems/nokogiri-1.6.0.rc1/ext/nokogiri/gem_make.out
Why is bundler trying to install nokogiri when that dependency is already met?
How can I fix this? Successfully installing nokogiri 1.6 or making the trinidad extension aware that 1.6 does not need to be installed would both be fine solutions.
In case it's relevant I have JRUBY_OPTS=-Xcext.enabled=true
UPDATE
I was able to get it work by first installing the gem outside of bundler:
jruby -S gem install trinidad_diagnostics_extension
And then the bundle command worked fine, since it was already installed. So I got it working by I am still confused by why I had to install it outside of bundler and why that would matter, and would like some insight if anyone has it.
1.6.0.pre1 does not exist for the Java platform, for uninteresting reasons. That said, you should only get prereleases if you specifically ask for them.

why is gem still outdated after bundle update

I am working on a gem and it's on github.
When I include the gem in an application, do a capistrano deploy, and (on the server) run:
bundle outdated
I see:
* authengine (0.0.1 d8baa49 > 0.0.1 de43dfa)
which tells me that a more recent commit is available. Why doesn't the bundle update (part of capistrano deploy) pull the more recent version? There is no version constraint in the Gemfile of the host application, and anyway they have the same version number, just different commits.
Even if I log into the server and run
bundle update authengine
I get the same "outdated" result afterwards.
What am I missing here?
One thing I've found that can cause this is if other gems in the bundle make requirements on gems by version that are incompatible. Bundler tries to reconcile these by selecting versions of gems such that their requirements can all be satisfied. The result is that it quietly refuses to update gems.
The way to check this is to set an explicit version requirement in your Gemfile. Something like
gem "authengine", "> 0.0.2" #(you'll need to bump the version to make this work)
#or
gem "authengine", :ref => "d8baa49"
Then run
bundle update authengine
You should see something like (this is taken from my particular case):
Bundler could not find compatible versions for gem "json": In
Gemfile:
chef (> 10.8) ruby depends on
json (<= 1.6.1, >= 1.4.4) ruby
logical-construct (>= 0) ruby depends on
json (1.7.5)
So, in my case it's a problem with explicitly requiring a newer version of json.
The author, André Arko, stated in 2014 that:
The Bundler resolver is definitely a work in progress, and we adjust
the tradeoffs between specific versions and resolving quickly based on
user feedback.
Bundler has consistently not provided the newest possible version of
every gem for the entirety of its existence, and it does result in a
lot of tickets being opened. In most cases, it turns out to be the
result of Bundler having to pick between the newest version of one gem
or a different gem, and Bundler picks the gem the user doesn’t care
about having the newest version of. That’s why it’s so important to
make your Gemfile version requirements accurately reflect your actual
requirements.
I recognize that your assumption that Bundler would give you the
newest possible version seemed valid at the time, but the docs only
say that you will get a version that meets your requirements, not the
latest. Is there anywhere we could expand the docs to make it clearer
that the newest versions of everything simply isn’t feasible?
What is the output returned when you run bundle update authengine? Does it actually say it updated the gem? Or does it ignore the gem?
You can try using the --source parameter to specifically tell Bundler to use the git repository. That, or your
bundle update authengine --source https://github.com/mustardseeddatabase/authengine.git
Also, when unexpected things like this happen, I like to clean up my gemlist in general. It could be that you still have older versions of the gem laying around, not using in bundler.
So you could do:
gem list
gem check
gem cleanup
Or do a complete reinstall
gem uninstall authengine
bundle install

Could not find gem 'rubytree (~> 0.5.2) ruby' while installing ChiliProject on Debian

I am trying to install chiliproject on a server, following the -well done- documentation I am hitting this error
Could not find gem 'rubytree (~> 0.5.2) ruby' in any of the gem sources listed in your Gemfile.
I did a gem install rubytree
I get this message
========================================================================
Thank you for installing rubytree.
WARNING: SIGNIFICANT API CHANGE in 0.8.0 !
------------------------------------------
Please note that as of 0.8.0 the CamelCase method names are DEPRECATED.
The new method names follow the ruby_convention (separated by '_').
The old CamelCase methods still work (a warning will be displayed),
but may go away in the future.
Details of the API changes are documented in the API-CHANGES file.
========================================================================
Successfully installed rubytree-0.8.1
1 gem installed
Installing ri documentation for rubytree-0.8.1...
file 'COPYING,API-CHANGES' not found
Installing RDoc documentation for rubytree-0.8.1...
file 'COPYING,API-CHANGES' not found
That is saying the installation was succesful. So why do I get the error ?
If the error is from the API change how can I request version 0.5.2 of the rubytree gem ?
When I do a gem list --local | grep 'rubytree'
I have this output rubytree (0.8.1)
So why is the system saying could not find gem 'rubytree' ?
thank you for any help,
Depending on what version of rails you are using (and it sounds like you are using a relatively newer one, if it's prompting you for your Gemfile), then you need to use Bundler to manage your gems.
Try editing your Gemfile, adding a new line that reads:
gem "rubytree", "< 0.6"
Then open up a console, and type this command
bundle install
This should fix your problems, but if you still get errors when running a command, then try typing bundle exec prior to the command (i.e. rails server becomes bundle exec rails server).
Currently, we require rubytree exactly in version 0.5.2 or 0.5.3, as specified in our Gemfile, the 0.8.1. version you installed by hand will not suffice that requirement, which is exactly what the error message states.
What seems a bit odd is the literal ruby in the error message. Could you please make sure that you have the exact unchanged Gemfile from the source on your system? Also, could you please remove any user-installed plugins and try again? Also, which ruby (type and version) on which operating system are you using?

Bundler can't find Ruby gem that appears on website

I installed Bundler on a pre-Rails 3 application and am trying to use it to install gems. My Gemfile contains the following lines:
source :rubygems
[...]
gem "RubyInline", "3.8.1"
However, when I run bundle install I get this error:
Fetching source index for http://rubygems.org/
Could not find gem 'RubyInline', required by 'memcache-client (= 1.6.3)', in any of the sources
The gem appears on the rubygems website:
http://rubygems.org/gems/RubyInline
Why is it giving me an error then?
I'm afraid this resolved itself after changes to fix other issues, and I'm not sure what the fix was. The source of several other issues was wrong permissions on various gems/binaries.
This kind of issue for me seems to be resolved on occasion by applying
bundle update
before
bundle install
The effect is to resolve old dependencies from when the bundle was originally produced and hence a gem that has been superseded (or whatever) will no longer be in the Gemfile.

Resources