Resolving gem dependencies while installing rails - ruby-on-rails

You Requested eventmachine=1.0.0
The bundle is currently has event machine locked at 0.12.10
try running bundle update environment.
After that it's showing problem in image.
after applying command "gem install kgio -v '2.6.0' " showing like this in image.
I followed the instruction and gone thorough the path gem_make.out file.
which contains the

If your dependencies are "CLASHING" with different gems try using the source of one or more of the gems.
Example:
gem 'capybara', git: 'https://github.com/jnicklas/capybara.git'
gem 'eventmachine', git: 'https://github.com/eventmachine/eventmachine.git'

Related

downgrading the gem coffee-script-source' to 1.8.0

I am getting this error:
ExecJS::ProgramError in Welcome#indexExecJS::ProgramError in Welcome#index.
According to others posts that error happens because there is a problem with coffee-script-source 1.9.0 running on windows. Actually, I am currently on coffee-script-source 1.10.0. Anyway, apparently, I have to downgrade the gem with the adding
gem 'coffee-script-source', '1.8.0'
to my gem file and runny commands:
bundle update
or
bundle install
Although I am in the directory of the gemfile, I get this message in cmd:
The system cannot find the path specified.
What is it that I am doing wrong?
Apparently, windows did not know how to run bundle command. But using ruby bundle worked and the gemfile was updated.
It seems that bundle is not installed. Therefore, you better install it first by
gem install bundle
and then bundle command works.

Rails could not find gem

when tried to start server rails s i have got
Could not find minitest-5.9.0 in any of the sources
Run `bundle install` to install missing gems.
i did gem install minitest -v 5.9.0
Successfully installed minitest-5.9.0
1 gem installed
also gem list
minitest (5.9.0, 4.7.5)
but when i try rails s again i received the same error.
How could i fix it?
bundle install
If you have tried that, try
bundle update
This will update your gems and your gemfile.lock
Best to specify the version you want in your Gemfile, at present you have 2 versions which will be causing the conflicts.
Something like gem 'minitest ', '~> 5.90' would do the trick. Once you have done this do bundle update this will ensure you update Gemfile to use the correct version of specified gem

Rails: Bundle install not working

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.

Bundler cannot find a version of a gem, but gem install with the same name works

I've created a gem, and for some reason this one keeps bugging me, and refuses to install properly through bundler.
Here's the Gemfile:
source 'https://rubygems.org'
gem 'rails', '3.2.9'
gem "switch_access-rails", "~> 1.1.6"
bundle install fails with:
Could not find gem 'switch_access-rails (~> 1.1.6) ruby' in the gems available on this machine.
This works:
gem install switch_access-rails -v 1.1.6
And the gem is here on rubygems: https://rubygems.org/gems/switch_access-rails/versions/1.1.6
I even tried bumping from version 1.1.5 to 1.1.6 just to see if that helped.
Installing version 1.1.4 in with bundle install works.
Any tips on where to start looking/debugging bundle install?
And after a whole day of googling I found this status update from Dec 12: http://twitter.com/rubygems_status/status/279019743166476288
bundle install --full-index
Seems to get the index directly from rubygems instead of from a cloudfront cache.
I had a look at the index, and there is quite a diffence in the two indexes, so if you just released a gem or use a newly released gem, you might have to add --full-index in order to get the proper index.
Do you have rubygems listed as a remote source?
Your Gemfile should have source :rubygems at the top of the file, and $ gem sources should return at a minimum:
*** CURRENT SOURCES ***
http://rubygems.org/
If it's not listed, you can add it with $ gem sources -a http://rubygems.org

Avoid "bundle install" to use pre-compiled gems

This is my very first question here :)
On a rails 3.2.6 (using rvm and ruby 1.8.7), my Gemfile contains two gems that cause problems when using the bundle install command.
Those gems are specified using:
gem 'libv8', "~> 3.11.8.3"
gem 'therubyracer', '~> 0.11.0beta6'
My problem is the following: when running bundle install command, bundler fetches binaries (precompiled) gems (libv8-3.11.8.3-x86_64-linux.gem and therubyracer-0.11.0beta6-x86_64-linux.gem) and not the plain source ones (libv8-3.11.8.3.gem and therubyracer-0.11.0beta6.gem).
The x86_64 version is incompatible with my server setup: included dynamic library uses an unknown symbol (rb_intern2, out of my old memory, I could be wrong) that makes that the precompiled gems cant be loaded by the application.
So that I must install gem from the source packages.
At the moment, I have to bundle install, then remove the precompiled gems from my ~/.rvm/gems/... and then gem install ~/tmp/libv8-3.11.8.3.gem and gem install ~/tmp/therubyracer-0.11.0beta6.gem, which is not very practical.
Is there any way to force Bundler to fetch the sources release and compile them ?
try:
bundle install --without x86_64-linux
x86_64-linux is a platform and bundler/rubygems uses it.
It should be equivalent of:
gem install libv8 -​-platform ruby
Details:
http://gembundler.com/man/gemfile.5.html
http://guides.rubygems.org/command-reference/#gem_install

Resources