![](/img/trans.png)
[英]Do I have to install Ruby from source to get Ruby 2.2.0 and Rails 4.2.0 installed on my windows machine?
[英]I just installed ruby on rails and i have created a folder but when i run rails s its says this. i have tried bundle install and searched from forums
C:/Ruby31-x64/lib/ruby/3.1.0/bundler/resolver.rb:268:in `block in verify_gemfile_dependencies_are_found!': Could not find gem 'rails (~> 7.0.1)' in locally installed gems. (Bundler::GemNotFound)
from C:/Ruby31-x64/lib/ruby/3.1.0/bundler/resolver.rb:252:in `each'
from C:/Ruby31-x64/lib/ruby/3.1.0/bundler/resolver.rb:252:in `verify_gemfile_dependencies_are_found!'
from C:/Ruby31-x64/lib/ruby/3.1.0/bundler/resolver.rb:48:in `start'
from C:/Ruby31-x64/lib/ruby/3.1.0/bundler/resolver.rb:23:in `resolve'
from C:/Ruby31-x64/lib/ruby/3.1.0/bundler/definition.rb:269:in `resolve'
from C:/Ruby31-x64/lib/ruby/3.1.0/bundler/definition.rb:476:in `materialize'
from C:/Ruby31-x64/lib/ruby/3.1.0/bundler/definition.rb:190:in `specs'
from C:/Ruby31-x64/lib/ruby/3.1.0/bundler/definition.rb:238:in `specs_for'
from C:/Ruby31-x64/lib/ruby/3.1.0/bundler/runtime.rb:18:in `setup'
from C:/Ruby31-x64/lib/ruby/3.1.0/bundler.rb:151:in `setup'
from C:/Ruby31-x64/lib/ruby/3.1.0/bundler/setup.rb:20:in `block in <top (required)>'
from C:/Ruby31-x64/lib/ruby/3.1.0/bundler/ui/shell.rb:136:in `with_level'
from C:/Ruby31-x64/lib/ruby/3.1.0/bundler/ui/shell.rb:88:in `silence'
from C:/Ruby31-x64/lib/ruby/3.1.0/bundler/setup.rb:20:in `<top (required)>'
from <internal:C:/Ruby31-x64/lib/ruby/3.1.0/rubygems/core_ext/kernel_require.rb>:85:in `require'
from <internal:C:/Ruby31-x64/lib/ruby/3.1.0/rubygems/core_ext/kernel_require.rb>:85:in `require'
from C:/railsprojects/project1/config/boot.rb:3:in `<top (required)>'
from bin/rails:3:in `require_relative'
from bin/rails:3:in `<main>'
确保 Gemfile 中的语法正确。 例如:
gem 'some-gem ', '0.0.1'
#空格
gem 'some-gem' '0.0.1'
#缺少逗号
正确的是: gem 'some-gem', '0.0.1'
您还可以检查此资源以确认您没有错过任何内容。 https://gorails.com/setup/windows/10
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.