Error installing nokogumbo gem with specific version - ruby-on-rails

I am trying to do bundle install on my project.
Ruby: 2.5.1
Rails: 5.0.7.2
Bundler: 1.17.3
But when doing the bundle install, it gives me this error with the nokogumbo gem and it doesn't install it, I'm using a mac.enter image description here

Have you tried:
bundle config set force_ruby_platform true
bundle install
Otherwise, paste in your commands and the output so we can see a better view of what is going on.

Related

rails bundler version issue

I have rails project working on Ubuntu.
Now I installed WSL on another machine and cloned the very same project.
Now when I try to install bundler with
gem install bundler
it installed bundler 2.0.2 and on bundle install it gives error:
Could not find gem 'bundler (< 2.0, >= 1.3.0)', which is required by gem 'rails (~> 5.0.0)'
Now I looked at the gemfile.lock it was bundled with 1.16.4, I installed it with
gem install bundler -v '1.16.4'
Now I do a simple bundle install, then it uses 2.0.2, so I have to do
bundle _1.16.4_ install
It completed successfully, but now when I am trying to do rails db:create, it says
The git source https://github.com/activerecord-hackery/ransack.git is not yet checked out. Please run bundle install before trying to start your application
What's wrong here?
Uninstall bundler 2.0.2:
gem uninstall bundler -v 2.0.2
If you still have problem, you can use:
bundle exec rails db:create
You can update to using bundler 2.x if possible with:
bundle update --bundler
This will change the BUNDLED_WITH version in Gemfile.lock.
see: https://bundler.io/guides/bundler_2_upgrade.html
You could also set the default bundler version:
bundler config default 1.16.4
gem list bundler
However I have found this to be a bit error prone.
Try to remove all your gems (go to the gems folder of your ruby, remove the specifications folder and the gems folder),
gem list should be more or less empty
gem install bundler
And try to bundle install again from scratch.

How Do You Install Missing sass-rails gem?

Hi new to stackoverflow and Ruby on Rails in general. I'm following the Kevin Skoglund Ruby on Rails 3 Essential Training online tutorial and I'm having trouble starting out. I'm trying to boot WEBrick but each time I try I get this error:
C:\Users\Matt\Documents\Sites\simple_cms>rails server
Could not find gem 'sass-rails (~> 5.0) x86-mingw32' in any of the gem sources l
isted in your Gemfile or installed on this machine.
Run bundle install to install missing gems.
What do I do to install this missing sass-rails gem, so I can boot WEBrick?
You can certainly run bundle install in your terminal, or command line, as the output suggests.
$ bundle install
If that fails, run:
$ gem install bundler
$ bundle install

Rails: Could not find minitest-4.7.5 in any of the sources

Here is a trouble: on my remote server command gem list shows:
some gems
minitest (4.7.5)
....
bundle show minitest command shows:
/var/lib/gems/1.9.1/gems/minitest-4.7.5
bundle show rails shows the same directory
bundle -v - 1.6.2 (the latest version)
But I've an error: Could not find minitest-4.7.5 in any of the sources (Bundler::GemNotFound)
The steps I've made
Delete Gemfile.lock and bundle install again
Reinstall bundler
Ruby version 2.1.2
Bundle install output shows Using minitest (4.7.5)
On the remote server run gem update bundler and after bundle install.
I think maybe the gems you installed system-wide cause the problem.
You may try bundle package locally, and commit the gems generated in vendor/cache. Pull it on server, and try bundle install —local.
Or, you may just use bundle install --path=vendor/bundle on server.
Give it a try, and hope this can help.

Bundle install issue

I add some gem to my gemfile.
Then i type :
$ bundle install
It will install the newly add gems in general , But it install the all gems, and it very slowly.
This is my terminal output:
Fetching gem metadata from http://rubygems.org/.........
Fetching gem metadata from http://rubygems.org/..
Resolving dependencies...
Enter your password to install the bundled RubyGems to your system:
Using rake (10.1.0)
Using i18n (0.6.5)
...
So:
How to make the bundle install fast, and i don't want it always install all gems
If you see Using gemname (version), it means the gem is already installed and Bundler doesn't reinstall it.
You need to bundle install all of your gems as there are dependency requirements between them. Bundler doesn't reinstall the gem's which state Using rake (10.1.0), but just confirms it's version to ensure gem dependency and prevent your application from producing runtime errors.
You can find out more information here:
http://bundler.io/

bundle fails with rake error on vagrant

I've been following the railscast on setting up Vagrant with rails found here:
http://railscasts.com/episodes/292-virtual-machines-with-vagrant
I have rbenv running on vagrant with a slightly more updated version of ruby(1.9.3p125). Everything goes fine until I try to bundle. Here's the error I get:
vagrant#lucid32:/vagrant$ bundle
Fetching gem metadata from http:rubygems...
Fetching gem metadata from http:rubygems...
Resolving dependencies...
Using rake (10.0.3)
Errno::EPROTO: Protocol error - /vagrant/bin
An error occurred while installing rake (10.0.3), and Bundler cannot continue.
Make sure that gem install rake -v '10.0.3' succeeds before bundling.
I've tried gem installing that version of rake, then running rbenv rehash which seems to install, but running bundle again still gives me the same error.
I was able to resolve this by downgrading bundler from 1.3.2 to 1.2.5.
rvm use #global
gem uninstall bundler
gem install bundler -v 1.2.5
# switch back to the default gemset
rvm use
bundle install
# everything should work now
The only other thing that I changed was I reverted from rvm 1.18.19 to 1.17.10, but I am not positive that step is necessary.

Resources