"The gem ... has been deleted. It was installed at" Error. Bundle install doesn't install gems. How to re-install gems? - bundler

I'm trying to build capybara-webkit on XP. I follow this instruction. I says:
8) Clone latest version of capybara-webkit from Github:
$ git clone git://github.com/thoughtbot/capybara-webkit.git
9) Bundle/Install capybara-webkit version:
$ cd ruby193\capybara-webkit
$ bundle install
I did so at the first time. It installed some gems. Then I followed the instruction steps but couldn't build capybara-webkit. So to begin one more time, I deleted all the gems that were installed manually. Now I follow all the same steps but bundle install doesn't work any more. I says that all the gems are present:
C:\RailsInstaller\Ruby1.9.3\lib\ruby\gems\1.9.1\gems>cd capybara-webkit
C:\RailsInstaller\Ruby1.9.3\lib\ruby\gems\1.9.1\gems\capybara-webkit>bundle install
Resolving dependencies...
Using rake (0.9.2)
Using addressable (2.3.2)
Using bundler (1.3.5)
Using appraisal (0.4.0)
Using mime-types (1.22)
Using nokogiri (1.5.9)
Using rack (1.5.2)
Using rack-test (0.6.2)
Using xpath (2.0.0)
Using capybara (2.1.0)
Using json (1.8.0)
Using capybara-webkit (1.0.0) from source at .
Using ffi (1.2.0)
Using childprocess (0.3.6)
Using diff-lcs (1.1.2)
Using websocket (1.0.6)
Using libwebsocket (0.1.7.1)
Using subexec (0.0.4)
Using mini_magick (3.2.1)
Using multi_json (1.5.0)
Using rack-protection (1.3.2)
Using rspec-core (2.6.4)
Using rspec-expectations (2.6.0)
Using rspec-mocks (2.6.0)
Using rspec (2.6.0)
Using rubyzip (0.9.9)
Using selenium-webdriver (2.27.2)
Using tilt (1.3.3)
Using sinatra (1.3.5)
Your bundle is complete!
Use `bundle show [gemname]` to see where a bundled gem is installed.
But now I check these gems with bundle show but it says they all were deleted:
C:\RailsInstaller\Ruby1.9.3\lib\ruby\gems\1.9.1\gems\capybara-webkit>bundle show sinatra
The gem sinatra has been deleted. It was installed at:
C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/sinatra-1.3.5
C:\RailsInstaller\Ruby1.9.3\lib\ruby\gems\1.9.1\gems\capybara-webkit>bundle show selenium-webdriver
The gem selenium-webdriver has been deleted. It was installed at:
C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/selenium-webdriver-2.27.2
C:\RailsInstaller\Ruby1.9.3\lib\ruby\gems\1.9.1\gems\capybara-webkit>bundle show mini_magick
The gem mini_magick has been deleted. It was installed at:
C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/mini_magick-3.2.1
How it can be that bundle install says they are present but bundle show says they are deleted? So bundle install doesn't work any more. How may I again use bundle install to install these gems again?

This solved it for me: "gem install" and "bundle install" do not install gem dependencies after manual gem deletion. How to inform Rubygems that gems were deleted manually?
(Delete the .gemspec files for the gems you have removed).

Related

Error loading watir-webdriver

Is there a way to install an earlier version of watir-webdriver including dependencies?
I've been running watir-webdriver for a while now, but just ran into problems today when installing on a new Windows environment.
The error is on the require "watir-webdriver". The first error line indicates that ruby is unable to load ffi
C:/Ruby21/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require': cannot load such file -- ffi_c (LoadError)
It looks like the problem may be with the combination of gems, so am including the versions here:
bigdecimal (1.2.4)
childprocess (0.5.3)
ffi (1.9.5 x86-mingw32)
io-console (0.4.2)
json (1.8.1)
minitest (4.7.5)
multi_json (1.10.1)
psych (2.0.5)
rake (10.1.0)
rdoc (4.1.0)
rubyzip (1.1.6)
selenium-webdriver (2.43.0)
test-unit (2.1.3.0)
watir-webdriver (0.6.11, 0.6.10)
websocket (1.2.1)
If you know of a version that worked in the past, you can simple remove the current version and install an old one with the -v flag for gem install.
For example,
gem uninstall watir-webdriver
gem install watir-webdriver -v '= 0.4.0'
You can find the different available version on rubygems.org It will automatically install the proper dependencies.

Foreman Installation on Raspberry fails due to missing capybara

We are attempting to install foreman on a raspberry as a demo for installation on larger machines such as the cubietruck. We have problems building the foreman-installer from source:
bundle install --without mysql2 pg test --path vendor
Your Gemfile lists the gem gettext_i18n_rails_js (>= 0.0.8) more than once.
You should probably keep only one of them.
While it's not a problem now, it could cause errors if you change the version of just one of them later.
Your Gemfile lists the gem gettext (~> 2.0) more than once.
You should probably keep only one of them.
While it's not a problem now, it could cause errors if you change the version of just one of them later.
Your Gemfile lists the gem locale (<= 2.0.9) more than once.
You should probably keep only one of them.
While it's not a problem now, it could cause errors if you change the version of just one of them later.
Your Gemfile lists the gem minitest (~> 4.7) more than once.
You should probably keep only one of them.
While it's not a problem now, it could cause errors if you change the version of just one of them later.
Fetching gem metadata from https://rubygems.org/........
Fetching additional metadata from https://rubygems.org/..
Resolving dependencies...............................................
Could not find gem 'capybara (~> 2.0.0) ruby' in the gems available on this
machine.
We have already manually installed capybara using gem and can locally see it:
sudo gem list
*** LOCAL GEMS ***
bundler (1.6.2)
capybara (2.0.0)
childprocess (0.5.3)
ffi (1.9.3)
mime-types (2.3)
mini_portile (0.6.0)
multi_json (1.10.1)
nokogiri (1.6.2.1)
rack (1.5.2)
rack-test (0.6.2)
rubyzip (1.1.4)
selenium-webdriver (2.42.0)
websocket (1.0.7)
xpath (1.0.0)
Any ideas what we are missing?
Regards
Stefan

bundle command not found after upgrading to Ruby 2.0.0 on OSX

I can't run bundle. I just upgraded Ruby to 2.0.0 using rvm. I'm using rvm 1.23.4 on OSX Mountain Lion.
Any idea what to do?
echo $PATH
/Users/Mohamad/.rvm/gems/ruby-2.0.0-p247/bin:/Users/Mohamad/.rvm/gems/ruby-2.0.0-p247#global/bin:/Users/Mohamad/.rvm/rubies/ruby-2.0.0-p247/bin:/Users/Mohamad/.rvm/bin:/Applications/Postgres.app/Contents/MacOS/bin:/usr/local/bin:/bin:/usr/bin:/usr/sbin:/sbin:/usr/local/git/bin
Update I ran gem list and bundler does not appear to be installed.
capistrano (2.15.5)
highline (1.6.19)
i18n (0.6.5)
net-scp (1.1.2)
net-sftp (2.1.2)
net-ssh (2.7.0)
net-ssh-gateway (1.2.0)
rake (10.1.0)
sshkit (1.0.0)
term-ansicolor (1.2.2)
tins (0.12.0)
RVM should install this gem for you - if it was not done this is a bug - open a ticket here: https://github.com/wayneeseguin/rvm/issues

How to debug Middleman 3 gem installation issues on Windows.

I have installed Middleman 3.1.5 as described on my Windows 8 Machnine along with Ruby using rubyinstaller-2.0.0-p247.exe and followed the steps to get started with success. I am now building my first site with some success (coding some pages, starting the server, building the site) but when I try to use some advanced third party components like middleman-navigation or middleman-deploy I seem to hit a wall. At first I thought of a mistake by myself but as more and more things seem to be buggy I want to figure out what is wrong with my setup or at least confirm nothing is.
Some example output that seems buggy to me:
$ middleman help
WARN: Unresolved specs during Gem::Specification.reset:
rack (>= 1.0, >= 1.4.5)
thor (< 2.0, >= 0.15.2)
activesupport (~> 3.2.6)
listen (~> 1.2.2)
i18n (~> 0.6.1)
WARN: Clearing out unresolved specs.
Please report a bug if this causes problems.
Tasks:
...
When i try to install middleman-deploy as described, adding gem "middleman-deploy" to my Gemfile and run bundle install there is no indication that anything changed:
$ bundle install
Using i18n (0.6.5)
Using multi_json (1.8.0)
Using activesupport (3.2.14)
Using chunky_png (1.2.8)
Using coffee-script-source (1.6.3)
Using execjs (1.4.0)
Using coffee-script (2.2.0)
Using fssm (0.2.10)
Using sass (3.2.10)
Using compass (0.12.2)
Using eventmachine (1.0.3)
Using http_parser.rb (0.5.3)
Using em-websocket (0.5.0)
Using ffi (1.9.0)
Using tilt (1.3.7)
Using haml (4.0.3)
Using hike (1.2.3)
Using kramdown (1.1.0)
Using rb-fsevent (0.9.3)
Using rb-inotify (0.9.2)
Using rb-kqueue (0.2.0)
Using listen (1.2.3)
Using bundler (1.3.5)
Using rack (1.5.2)
Using rack-test (0.6.2)
Using thor (0.18.1)
Using middleman-core (3.1.5)
Using middleman-more (3.1.5)
Using sprockets (2.10.0)
Using sprockets-helpers (1.0.1)
Using sprockets-sass (1.0.1)
Using middleman-sprockets (3.1.4)
Using uglifier (2.1.2)
Using middleman (3.1.5)
Using rack-livereload (0.3.15)
Using middleman-livereload (3.1.0)
Using wdm (0.1.0)
Your bundle is complete!
Use `bundle show [gemname]` to see where a bundled gem is installed.
I then add a configuration to config.rb and try to use the gem without success:
$ middleman deploy
WARN: Unresolved specs during Gem::Specification.reset:
rack (>= 1.0, >= 1.4.5)
thor (< 2.0, >= 0.15.2)
multi_json (~> 1.0)
rb-inotify (>= 0.9)
WARN: Clearing out unresolved specs.
Please report a bug if this causes problems.
There's no 'deploy' command for Middleman. Try 'middleman help' for a list of commands.
Please help me to narrow down the cause of these issues.
I had a similar WARN: Unresolved specs during Gem::Specification.reset: message when I did middleman build I'm on a Mac using rvm with ruby 2.0.0p247 (2013-06-27 revision 41674) [x86_64-darwin12.3.0]. I found an issue post on GitHub with a similar WARN and the fix was to run gem regenerate_binstubs. It cleared the WARN for me. I'm not sure exactly what that does but it clears up a few issues with rubygems-bundler.

How do I get ruby gems to include all dependencies of a gem, even ones in BETA?

Ruby gems only seems to include non-beta dependencies. eg. try:
gem install ripple --include-dependencies
: and you get the message:
ERROR: Error installing ripple:
ripple requires activesupport (~> 3.0.0.beta, runtime)
Update:
I found that this isn't possible in ruby gems. This however finally worked. Thanks #levi:
gem update --system
gem install tzinfo builder memcache-client rack rack-test rack-mount erubis mail text-format thor bundler i18n
gem install rails --pre
gem install ripple
Upgrade your RubyGems version, this is fixed as of RubyGems 1.3.6.
Yup, rubygems can't resolve prerelease gems.
The workaround (resolving the dependencies by hand) should look like this:
gem install tzinfo builder memcache-client rack rack-test rack-mount erubis mail text-format thor bundler i18n
gem install rails --pre
gem install ripple
It's a limitation of the current rubygems. Install the beta version of activesupport manually.

Resources