我正在嘗試學習Ruby on Rails。 目前正在嘗試Rails框架。我已經安裝了它。在MyBlog文件夾中創建新的項目,但是當我嘗試運行:運行rails服務器時找不到gem'rails(= 4.2.5)x86-mingw32'
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.
我已經安裝了捆綁的建議。安裝它也很少出現問題,但我在互聯網上發現了一個靈魂。
軟件包之前安裝我正在另一個錯誤說,它不能找到寶石「sqlite3的」
是否有人有類似的問題?你能幫我解決嗎?
更新:我的Gemfile的
內容是:
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]
錯誤時嘗試運行 '包安裝':
你有一個問題,但建議的解決方案解決了這個問題。大。但你之前還有另一個問題?你還擁有它嗎?我無法跟隨。你真正的問題是什麼?你現在面臨什麼問題? – spickermann
@spickermann當我運行'rails server'命令時,問題不在於創建rails gem。 –
你能發佈你的寶石文件和軟件包安裝錯誤嗎? – SaravanaKumAr