skip to Main Content

Im super new to rails development and am following a basic rails tutorial to get started. I have successfully install rails and ruby on my windows 10, but for some reason the server does not work. I have tried different versions of rails and every time I get a different error. Here is the error message I keep receiving. Any help will be extremely be appreciated. Thank you.

$ rails s

C:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/gems/bundler-1.15.3/lib/bundler/resolver.rb:396:in block in verify_gemfile_dependencies_are_found!': Could not find gem 'tzinfo-data x86-mingw32' in any of the gem sources listed in your Gemfile. (Bundler::GemNotFound)
from C:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/gems/bundler-1.15.3/lib/bundler/resolver.rb:366:in
each’
from C:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/gems/bundler-1.15.3/lib/bundler/resolver.rb:366:in verify_gemfile_dependencies_are_found!'
from C:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/gems/bundler-1.15.3/lib/bundler/resolver.rb:212:in
start’
from C:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/gems/bundler-1.15.3/lib/bundler/resolver.rb:191:in resolve'
from C:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/gems/bundler-1.15.3/lib/bundler/definition.rb:235:in
resolve’
from C:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/gems/bundler-1.15.3/lib/bundler/definition.rb:159:in specs'
from C:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/gems/bundler-1.15.3/lib/bundler/definition.rb:218:in
specs_for’
from C:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/gems/bundler-1.15.3/lib/bundler/definition.rb:207:in requested_specs'
from C:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/gems/bundler-1.15.3/lib/bundler/runtime.rb:109:in
block in definition_method’
from C:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/gems/bundler-1.15.3/lib/bundler/runtime.rb:21:in setup'
from C:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/gems/bundler-1.15.3/lib/bundler.rb:101:in
setup’
from C:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/gems/bundler-1.15.3/lib/bundler/setup.rb:19:in <top (required)>'
from C:/RailsInstaller/Ruby2.3.3/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:127:in
require’
from C:/RailsInstaller/Ruby2.3.3/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:127:in rescue in require'
from C:/RailsInstaller/Ruby2.3.3/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:40:in
require’
from C:/Sites/myarticles/config/boot.rb:3:in <top (required)>'
from bin/rails:3:in
require_relative’
from bin/rails:3:in `’

Here is the Gemfile

source 'https://rubygems.org'

git_source(:github) do |repo_name|
  repo_name = "#{repo_name}/#{repo_name}" unless repo_name.include?("/")
  "https://github.com/#{repo_name}.git"
end


# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '~> 5.1.3'
# Use sqlite3 as the database for Active Record
gem 'mysql2'
# Use Puma as the app server
gem 'puma', '~> 3.7'
# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
# gem 'jbuilder', '~> 2.5'
# Use Redis adapter to run Action Cable in production
# gem 'redis', '~> 3.0'
# Use ActiveModel has_secure_password
# gem 'bcrypt', '~> 3.1.7'

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

# Use Rack CORS for handling Cross-Origin Resource Sharing (CORS), making cross-origin AJAX possible
# gem 'rack-cors'

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

group :development do
end

# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby]

2

Answers


  1. Please do following, but share Gemfile also, as error message is saying Gem not found.

    First install ssl_certificate into your ssl_certificate directory of railsinstller. You can following this url
    Now use following command to update

    gem update --system
    

    Now go to your rails project folder and run following command

    bundle install
    

    Also check you have installed node, npm and yarn. If still error persist make sure all installation of node done.

    Login or Signup to reply.
  2. I have the same problem with you, when I need to run

    rails s
    

    The alert was coming like

    Could not find gem 'tzinfo-data'
    

    The default on my Gemfile

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

    I remove "platforms: [:mingw, :mswin, :x64_mingw, :jruby]", then my Gemfile like this

    gem "tzinfo-data"
    

    After that run

    bundle install
    

    It’s work on my Windows 10

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search