Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Could not find gem 'rails (= 4.2.4) x64-mingw32'

I was first developing my RoR application in Windows. Now since I've been founding a few problems regarding some gems, SSH and stuff I decided to move to Linux. I am trying to initate the application, but It seems I am not able to.

When I do bundle update rails I got the following error:

Could not find gem 'rails (= 4.2.4) x64-mingw32' in the gems available on this
machine.

This is my tzinfo-data gem:

gem 'tzinfo-data', platforms: [:mingw, :mswin, :jruby]

But I have already tried with this one too:

gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby]

Any idea? Because when I just do bundle install I also got the following error:

You have requested:
  rails = 4.2.4

The bundle currently has rails locked at 4.2.4.
Try running `bundle update rails`

Update:

Gemfile content

source 'https://rubygems.org'


# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '4.2.4'
# Use postgresql as the database for Active Record
gem 'pg'
# Use SCSS for stylesheets
gem 'sass-rails', '~> 5.0'
# Use Uglifier as compressor for JavaScript assets
gem 'uglifier', '>= 1.3.0'
# Use CoffeeScript for .coffee assets and views
gem 'coffee-rails', '~> 4.1.0'
# See https://github.com/rails/execjs#readme for more supported runtimes
# gem 'therubyracer', platforms: :ruby

gem 'bootstrap-sass', '~> 3.2.0'
gem 'autoprefixer-rails'

gem 'devise'

gem 'bootstrap_form'


# Use jquery as the JavaScript library
gem 'jquery-rails'
# Turbolinks makes following links in your web application faster. Read more: https://github.com/rails/turbolinks
gem 'turbolinks'
# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
gem 'jbuilder', '~> 2.0'
# bundle exec rake doc:rails generates the API under doc/api.
gem 'sdoc', '~> 0.4.0', group: :doc

# Use ActiveModel has_secure_password
gem "bcrypt-ruby", '~> 3.0.0'

gem 'google-api-client', '0.9'

gem 'letsrate'

gem 'will_paginate', '~> 3.0.6'

gem 'filterrific'

#gem 'ratyrate'

# Use Unicorn as the app server
# gem 'unicorn'

# Use Capistrano for deployment
# gem 'capistrano-rails', group: :development

group :development, :test do
  # Call 'byebug' anywhere in the code to stop execution and get a debugger console
  gem 'byebug'
end

group :development do
  # Access an IRB console on exception pages or by using <%= console %> in views
  gem 'web-console', '~> 2.0'
end

# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
gem 'tzinfo-data', platforms: [:mingw, :mswin, :jruby]
like image 518
heisenberg Avatar asked Mar 12 '16 18:03

heisenberg


2 Answers

If you’ve installed Rails using bundler and rubygems, make sure you have the latest version in your Gemfile:

rails '4.2.4'

there is Gemfile.lock which locks the version. You delete that and run again bundle install. it will work.

bundle install
like image 72
Mohammad Shahadat Hossain Avatar answered Nov 14 '22 01:11

Mohammad Shahadat Hossain


  1. Visit https://rubygems.org/gems
  2. Search for your gem. Once found, copy the text from the box titled GEMFILE
  3. Add the copied text in your Gemfile found inside your app
  4. Run bundlefrom the console opened at the root of your app.

On successful installation of the gems your console will display the message: Bundle complete! xx Gemfile dependencies, xx gems now installed.

like image 44
Steffi Keran Rani J Avatar answered Nov 14 '22 01:11

Steffi Keran Rani J