我是第一次在Windows中开发我的RoR应用程序。既然我已经在一些宝石,SSH和东西上找到了一些问题,我决定转向Linux。我正在尝试启动应用程序,但似乎我无法做到。
当我bundle update rails
时,我收到以下错误:
Could not find gem 'rails (= 4.2.4) x64-mingw32' in the gems available on this
machine.
这是我的tzinfo-data gem:
gem 'tzinfo-data', platforms: [:mingw, :mswin, :jruby]
但我也尝试过这个:
gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby]
有什么想法吗?因为当我刚做bundle install
时,我也遇到了以下错误:
You have requested:
rails = 4.2.4
The bundle currently has rails locked at 4.2.4.
Try running `bundle update rails`
更新
Gemfile内容
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]
答案 0 :(得分:4)
如果你使用bundler和rubygems安装了Rails,请确保你的Gemfile中有最新版本:
rails '4.2.4'
有Gemfile.lock来锁定版本。您删除它并再次运行bundle install。它会起作用。
bundle install
答案 1 :(得分:0)
Gemfile
中bundle
。成功安装gem后,您的控制台将显示以下消息:
Bundle complete! xx Gemfile dependencies, xx gems now installed.