Ruby on rails 找不到gem';导轨(=4.2.5)x86-mingw32';运行rails服务器时

Ruby on rails 找不到gem';导轨(=4.2.5)x86-mingw32';运行rails服务器时,ruby-on-rails,ruby,ruby-on-rails-3,rubygems,Ruby On Rails,Ruby,Ruby On Rails 3,Rubygems,我正在努力学习RubyonRails。 目前正在试用Rails框架。我已经安装好了。在MyBlog文件夹中创建新项目,但当我尝试运行时: rails server 我得到一个错误: Could not find gem 'rails (= 4.2.5) x86-mingw32' in any of the gem sources listed in your Gemfile or available on this machine. Run `bundle install` to instal

我正在努力学习RubyonRails。 目前正在试用Rails框架。我已经安装好了。在MyBlog文件夹中创建新项目,但当我尝试运行时:

rails server
我得到一个错误:

Could not find gem 'rails (= 4.2.5) x86-mingw32' in any of the gem sources listed in your Gemfile or available on this machine. Run `bundle install` to install missing gems.
我已经按照建议安装了bundle。安装时也没什么问题,但我在网上找到了一个解决方案

在bundle安装之前,我遇到了另一个错误,说它找不到gem'sqlite3'

有人有类似的问题吗?你能帮我解决这个问题吗

更新:

我的文件的内容是:

source 'https://rubygems.org'


# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '4.2.5'
# Use sqlite3 as the database for Active Record
gem 'sqlite3'
# 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

# 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', '~> 3.1.7'

# 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, :x64_mingw, :jruby]
源代码'https://rubygems.org'
#捆绑边缘Rails:gem'Rails',github'Rails/Rails'
gem“轨道”,“4.2.5”
#使用sqlite3作为活动记录的数据库
gem'sqlite3'
#将SCS用于样式表
gem'sass-rails',“~>5.0”
#使用Uglifier作为JavaScript资产的压缩器
gem'uglifier','>=1.3.0'
#将CoffeeScript用于.coffee资产和视图
gem“咖啡轨”,“~>4.1.0”
#看https://github.com/rails/execjs#readme 获取更多受支持的运行时
#宝石“therubyracer”,平台::ruby
#使用jquery作为JavaScript库
gem'jqueryrails'
#Turbolinks使web应用程序中的以下链接更快。阅读更多:https://github.com/rails/turbolinks
gem“涡轮链接”
#轻松构建JSON API。阅读更多:https://github.com/rails/jbuilder
gem'jbuilder',“~>2.0”
#bundle exec rake doc:rails在doc/API下生成API。
gem'sdoc','~>0.4.0',组::doc
#使用ActiveModel具有\u安全\u密码
#gem'bcrypt',“~>3.1.7”
#使用Unicorn作为应用程序服务器
#宝石“独角兽”
#使用Capistrano进行部署
#gem“capistrano rails”,集团::开发
小组:开发,:测试
#在代码中的任意位置调用“byebug”以停止执行并获得调试器控制台
宝石“比伯”
结束
小组:发展怎么办
#在异常页面上或通过在视图中使用访问IRB控制台
gem“web控制台”,“~>2.0”
结束
#Windows不包括zoneinfo文件,因此捆绑tzinfo数据
gem'tzinfo data',平台:[:mingw,:mswin,:x64_mingw,:jruby]
尝试运行“捆绑安装”时出错:


尝试安装以下软件包以成功安装捆绑包

sudo apt-get install build-essential
sudo apt-get install libgmp3-dev

这些软件包适用于Linux环境。找到其他环境的替代方案。如果有任何错误,请告诉我。

打开文件Gemfile.lock,查找并删除“x64-mingw32”,然后运行命令:-


$bundle安装

迟了回答,但我刚才遇到了这种情况。
sudo apt-get install build-essential
sudo apt-get install libgmp3-dev
对我有效的是我意外地安装了一个旧的Ruby版本

在上一个屏幕截图中,您收到一行:

在绑定之前确保'gem install json-v'1.8.3'成功

此命令可能由于较旧的Ruby版本而失败,请在此处获取最新版本(假设您是windows用户)

附言

确保您删除了任何以前的Ruby/Rails安装。
您需要的是一个“With DEVKIT”安装程序,最好是他们推荐的安装程序(以“=>”开头)。

您遇到了一个问题,但用建议的解决方案解决了它。伟大的但是你以前有另一个问题吗?你还有吗?我听不懂。你真正的问题是什么?你现在面临什么问题?@spickermann当我运行“rails服务器”命令时,问题不是创建rails gem。你能发布你的gem文件和捆绑包安装错误吗?@SaravanaKumAr当然,我会立即编辑我的帖子。我已经试过使用gem安装构建要素。。。但我想这不是Windows的命令,它不适合您为Unix提供的命令。我发现:C:\Users\n.mosorinski\Rails\apps\MyBlog>gem安装构建基本错误:在任何存储库中都找不到有效的gem“build essential”(>=0)错误:可能的备选方案:刀子essentials、构建评估、essentials、spree essentials我在回答中提到了它自己可以检查这个吗