本文介绍了Rails S无法启动服务器:找不到导轨(> = 0)?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述 29岁程序员,3月因学历无情被辞! 我对Ruby / Rails相当陌生,但我还没有发现如何开始它(它在几天前工作)。 我正在执行应用程序文件夹,然后是 rails s /Users/me/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/site_ruby/1.9.1/rubygems/dependency.rb:247:in`to_specs':Could not find rails( > = 0),其中来自/Users/me/.rvm/rubies/ruby-1.9的[minitest-1.6.0,rake-0.8.7,rdoc-2.5.8](Gem :: LoadError)。 2-p290 / lib / ruby / site_ruby / 1.9.1 / rubygems / dependency.rb:256:在`to_spec' from /Users/me/.rvm/rubies/ruby-1.9.2-p290/lib /ruby/site_ruby/1.9.1/rubygems.rb:1210:in`gem' from / usr / bin / rails:18:in< main>' 因此,当检查宝石列表时,有以下内容: rails(3.1.0,3.1.0.rc8,3.1.0.rc6) rails_config(0.2.4) 当我重试gem install rails时,我得到 成功安装了rails-3.1 .0 1 gem已安装安装ri文件for rails-3.1.0 ... 文件'lib'找不到安装RDo c的文档为rails-3.1.0 ... 文件'lib'未找到 Bundle show rails: 警告:#< ArgumentError:Illformed requirements [#< YAML :: Syck :: DefaultKey: 0x10dd4fec8> 2.10.3]> # - * - encoding:utf-8 - * - Gem :: Specification.new do | s | s.name =% q {simplecov} s.version =0.5.0(ETC :) Gem Env: RubyGems环境: - RUBYGEMS版本:1.8.10 - RUBY VERSION:1.9.2(2011-07-09 patchlevel 290)[x86_64-darwin11.1.0] - INSTALLATION DIRECTORY:/Users/me/.rvm/gems/ruby-1.9.2-p290 - RUBY EXECUTABLE:/Users/me/.rvm/rubies/ruby-1.9.2-p290/bin/ruby - 可执行目录:/Users/me/.rvm/gems/ruby-1.9.2- p290 / bin - RUBYGEMS平台: - ruby - x86_64-darwin-11 - 创业板路径: - /Users/me/.rvm/gems/ ruby-1.9.2-p290 - /Users/me/.rvm/gems/ruby-1.9.2-p290@global - 创业板配置: - :update_sources => true - :verbose => true - :benchmark => false - :backtrace => false - :bulk_threshold => 1000 - REMOTE来源: - http://rubygems.org/ 现在我试了8个小时,也许有人可以帮我在这里?非常感谢! 编辑1 : 运行bundle exec rails s: 警告:#< ArgumentError:形式化要求[#< YAML :: Syck :: DefaultKey:0x10dd4fec8> 2.10。 3\" ]> # - * - encoding:utf-8 - * - Gem :: Specification.new do | s | s.name =%q {simplecov} s.version =0.5.0 s.required_rubygems_version = Gem :: Requirement.new(> = 0 )如果s.respond_to? :required_rubygems_version = s.authors = [Christoph Olszowka] s.date =%q {2011-09-09} s.description =%q {Ruby 1.9的代码覆盖率通过一个强大的配置库和跨测试套件自动合并覆盖范围} s.email = [christoph at olszowka de] s.files = [.gitignore,.rvmrc, .travis.yml,Gemfile,LICENSE,README.rdoc,Rakefile,cucumber.yml,features / config_adapters.feature,features / config_autoload.feature,features / config_command_name features / config_project_name.feature,features / config_project_name.feature,features / config_styles.feature,features / cucumber_basic.feature,features / config_coverage_dir.feature,features / config_deactivate_merging.feature,features / config_merge_timeout.feature 特性/ merging_test_unit_and_rspec.feature, 特性/ rspec_basic.feature, 特性/ rspec_groups_and_filters_basic.feature, 特性/ rspec_groups_and_filters_complex.feature, 特性/ rspec_without_simplecov.feature, 特性/特征/步骤定义/变形金刚.rb,features / step_definitions / web_steps.rb,features / support / env.rb,features / step_definitions / html_steps.rb,features / step_definitions / simplecov_steps.rb test_unit_basic.feature 特性/ test_unit_groups_and_filters_basic.feature, 特性/ test_unit_groups_and_filters_complex.feature, 特性/ test_unit_without_simplecov.feature, LIB / simplecov.rb, LIB / simplecov / adapters.rb, LIB / ,lib / simplecov / configuration.rb,lib / simplecov / defaults.rb,lib / simplecov / file_list.rb,lib / simplecov / filter.rb,lib / simplecov / ,lib / simplecov / formatter.rb,lib / simplecov / formatter / simple_formatter.rb,lib / simplecov / jruby_float_fix.rb,lib / simplecov / merge_helpers.rb,lib / simplecov / result.rb lib / simplecov / source_file.rb,lib / simplecov / version.rb,simplecov.gemspec,test / faked_project / Gemfile,test / faked_project / Rakefile ,test / faked_project / cucumber.yml,test / faked_project /features/step_definitions/my_steps.rb,test / faked_project / features / support / env.rb,test / faked_project / features / test_stuff.feature,test / faked_project / lib / faked_project.rb,test /faked_project/lib/faked_project/framework_specific.rb 测试/ faked_project / LIB / faked_project / meta_magic.rb, 测试/ faked_project / LIB / faked_project / some_class.rb, 测试/ faked_project /规格/ faked_spec.rb test / faked_project / spec / meta_magic_spec.rb,test / faked_project / spec / some_class_spec.rb,test / faked_project / spec / spec_helper.rb,test / faked_project / test / faked_test.rb, test / faked_project / test / meta_magic_test.rb,test / faked_project / test / some_class_test.rb,test / faked_project / test / test_helper.rb,test / fixtures / app / controllers / sample_controller.rb, test / fixtures / app / models / user.rb,test / fixtures / deleted_source_sample.rb,test / fixtures / frameworks / rspec_bad.rb,test / fixtures / frameworks / rspec_good.rb,test /fixtures/frameworks/testunit_bad.rb,test / fixtures / frameworks / testunit_good.r b,test / fixtures / resultset1.rb,test / fixtures / resultset2.rb,test / fixtures / sample.rb,test / helper.rb,test / shoulda_macros.rb test / test_1_8_fallbacks.rb,test / test_command_guesser.rb,test / test_deleted_source.rb,test / test_file_list.rb,test / test_filters.rb,test / test_merge_helpers.rb,test / test_result.rb,test / test_return_codes.rb,test / test_source_file.rb,test / test_source_file_line.rb] s.homepage =%q {http://github.com/colszowka/ simplecov} s.require_paths = [lib] s.rubyforge_project =%q {simplecov} s.rubygems_version =%q {1.3.6} s.summary =%q {Ruby 1.9的代码覆盖率,一个强大的配置库和跨测试套件自动合并覆盖范围} s.test_files = [features / config_adapters.feature,features / config_autoload.feature,features /config_command_name.feature,features / config_coverage_dir.feature,features / config_deactivate_merging.feature,features / config_merge_timeout.feature features / config_project_name.feature,features / config_styles.feature,features / cucumber_basic.feature,features / merging_test_unit_and_rspec.feature,features / rspec_basic.feature,features / rspec_groups_and_filters_basic.feature,特征/ rspec_groups_and_filters_complex.feature 特性/ rspec_without_simplecov.feature, 特征/ step_definitions / html_steps.rb, 特征/ step_definitions / simplecov_steps.rb, 特征/ step_definitions / transformers.rb, 特征/ step_definitions / web_steps.rb 特征/支持/ env.rb, 特性/ test_unit_basic.feature, 特性/ test_unit_groups_and_filters_basic.feature, 特性/ test_unit_groups_and_filters_complex.feature, 特性/ test_unit_without_simplecov.feature, 测试/ faked_project / Gemfile,test / faked_project / Rakefile,test / faked_project / cucumber.yml,test / faked_project / features / step_definitions / my_steps.rb,test / faked_project / features / support / env.rb ,test / faked_project / features / test_stuff.feature,test / fa ked_project / LIB / faked_project.rb, 测试/ faked_project / LIB / faked_project / framework_specific.rb, 测试/ faked_project / LIB / faked_project / meta_magic.rb, 测试/ faked_project / LIB / faked_project / some_class.rb ,test / faked_project / spec / faked_spec.rb,test / faked_project / spec / meta_magic_spec.rb,test / faked_project / spec / some_class_spec.rb,test / faked_project / spec / spec_helper.rb test / faked_project / test / faked_test.rb,test / faked_project / test / meta_magic_test.rb,test / faked_project / test / some_class_test.rb,test / faked_project / test / test_helper.rb,test / test / fixture / frameworks / rspec_bad.rb,test / fixtures / app / models / user.rb,test / fixtures / ,test / fixtures / frameworks / testunit_good.rb,test / fixtures / resultset1.rb,test / fixtures / resultset2。 rb,test / fixtures / sample.rb,test / helper.rb,test / shoulda_macros.rb,test / te st_1_8_fallbacks.rb,test / test_command_guesser.rb,test / test_deleted_source.rb,test / test_file_list.rb,test / test_filters.rb,test / test_merge_helpers.rb,test / test_result rb,test / test_return_codes.rb,test / test_source_file.rb,test / test_source_file_line.rb] 如果s.respond_to? :specification_version then current_version = Gem :: Specification :: CURRENT_SPECIFICATION_VERSION s.specification_version = 3 如果Gem :: Version.new(Gem :: RubyGemsVersion)> = Gem :: Version.new('1.2.0')然后 s.add_runtime_dependency(%q ,[〜> 0.5.0]) s.add_development_dependency(%q s.add_development_dependency(%q s.add_development_dependency(%q s.add_development_dependency(%q< rake>,[< = 0.9.0]) s.add_development_dependency(%q s.add_development_dependency(%q else s.add_dependency(%q< simplecov-html>,[〜> 0.5.0]) s.add_dependency(%q s.add_dependency(%q s.add_dependency(%q 1.0.0]) s.add_dependency(%q s.add_dependency(%q ,[> = 2.6.0]) s.add_dependency(%q end else s.add_dependency(%q< simplecov-html> ;, [〜> 0.5.0 ]) s.add_dependency(%q ,[> = 0.4.5]) s.add_dependency(%q 1.0.0 ]) s.add_dependency(%q 1.0.0]) s.add_dependency(%q ,[ s.add_dependency(%q< rspec>,[> = 2.6.0]) s.add_dependency(%q end end 警告:'/Library/Ruby/Gems/1.8/specifications/simplecov-0.5中的无效.gemspec格式。 0.gemspec'注意:不推荐使用Gem.source_index,使用Specification在2011年11月1日或之后删除。 Gem.source_index从/Library/Ruby/Gems/1.8/gems/bundler-1.0.10/lib/bundler/shared_helpers.rb:3调用。 git://github.com/ryanb/nested_form.git(主人)没有签出。请运行`bundle install` 运行gem pristine --all --no-extensions:运行正常rails: 已恢复的rack-mount-0.8.2 已恢复的rack-openid-1.3.1 恢复rack-ssl-1.3.2 恢复rack-test-0.6.1 错误:执行gem时(Errno :: EACCES)权限被拒绝 - / Users / me / .rvm / gems / ruby-1.9.2-p290 / gems / rails-3.1.0 / bin / rails 解决方案您是否尝试过: 捆绑安装 和: bundle exec rails s I am fairly new to Ruby/Rails but I just have not found out how to get it started (it worked a few days ago).I am in the actuall app folder and then rails s/Users/me/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/site_ruby/1.9.1/rubygems/dependency.rb:247:in `to_specs': Could not find rails (>= 0) amongst [minitest-1.6.0, rake-0.8.7, rdoc-2.5.8] (Gem::LoadError)from /Users/me/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/site_ruby/1.9.1/rubygems/dependency.rb:256:in `to_spec'from /Users/me/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/site_ruby/1.9.1/rubygems.rb:1210:in `gem'from /usr/bin/rails:18:in `<main>'So when checking "gem list" the following is thererails (3.1.0, 3.1.0.rc8, 3.1.0.rc6)rails_config (0.2.4)When I retry "gem install rails" I get Successfully installed rails-3.1.01 gem installedInstalling ri documentation for rails-3.1.0...file 'lib' not foundInstalling RDoc documentation for rails-3.1.0...file 'lib' not foundBundle show rails:WARNING: #<ArgumentError: Illformed requirement ["#<YAML::Syck::DefaultKey:0x10dd4fec8> 2.10.3"]># -*- encoding: utf-8 -*-Gem::Specification.new do |s| s.name = %q{simplecov} s.version = "0.5.0"(ETC:)Gem Env:RubyGems Environment: - RUBYGEMS VERSION: 1.8.10 - RUBY VERSION: 1.9.2 (2011-07-09 patchlevel 290) [x86_64-darwin11.1.0] - INSTALLATION DIRECTORY: /Users/me/.rvm/gems/ruby-1.9.2-p290 - RUBY EXECUTABLE: /Users/me/.rvm/rubies/ruby-1.9.2-p290/bin/ruby - EXECUTABLE DIRECTORY: /Users/me/.rvm/gems/ruby-1.9.2-p290/bin - RUBYGEMS PLATFORMS: - ruby - x86_64-darwin-11 - GEM PATHS: - /Users/me/.rvm/gems/ruby-1.9.2-p290 - /Users/me/.rvm/gems/ruby-1.9.2-p290@global - GEM CONFIGURATION: - :update_sources => true - :verbose => true - :benchmark => false - :backtrace => false - :bulk_threshold => 1000 - REMOTE SOURCES: - http://rubygems.org/I have tried for 8 hours straight now, maybe someone can help me out here? Thanks so much!Edit 1:Running bundle exec rails s:WARNING: #<ArgumentError: Illformed requirement ["#<YAML::Syck::DefaultKey:0x10dd4fec8> 2.10.3"]># -*- encoding: utf-8 -*-Gem::Specification.new do |s| s.name = %q{simplecov} s.version = "0.5.0" s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version= s.authors = ["Christoph Olszowka"] s.date = %q{2011-09-09} s.description = %q{Code coverage for Ruby 1.9 with a powerful configuration library and automatic merging of coverage across test suites} s.email = ["christoph at olszowka de"] s.files = [".gitignore", ".rvmrc", ".travis.yml", "Gemfile", "LICENSE", "README.rdoc", "Rakefile", "cucumber.yml", "features/config_adapters.feature", "features/config_autoload.feature", "features/config_command_name.feature", "features/config_coverage_dir.feature", "features/config_deactivate_merging.feature", "features/config_merge_timeout.feature", "features/config_project_name.feature", "features/config_styles.feature", "features/cucumber_basic.feature", "features/merging_test_unit_and_rspec.feature", "features/rspec_basic.feature", "features/rspec_groups_and_filters_basic.feature", "features/rspec_groups_and_filters_complex.feature", "features/rspec_without_simplecov.feature", "features/step_definitions/html_steps.rb", "features/step_definitions/simplecov_steps.rb", "features/step_definitions/transformers.rb", "features/step_definitions/web_steps.rb", "features/support/env.rb", "features/test_unit_basic.feature", "features/test_unit_groups_and_filters_basic.feature", "features/test_unit_groups_and_filters_complex.feature", "features/test_unit_without_simplecov.feature", "lib/simplecov.rb", "lib/simplecov/adapters.rb", "lib/simplecov/command_guesser.rb", "lib/simplecov/configuration.rb", "lib/simplecov/defaults.rb", "lib/simplecov/file_list.rb", "lib/simplecov/filter.rb", "lib/simplecov/formatter.rb", "lib/simplecov/formatter/simple_formatter.rb", "lib/simplecov/jruby_float_fix.rb", "lib/simplecov/merge_helpers.rb", "lib/simplecov/result.rb", "lib/simplecov/result_merger.rb", "lib/simplecov/source_file.rb", "lib/simplecov/version.rb", "simplecov.gemspec", "test/faked_project/Gemfile", "test/faked_project/Rakefile", "test/faked_project/cucumber.yml", "test/faked_project/features/step_definitions/my_steps.rb", "test/faked_project/features/support/env.rb", "test/faked_project/features/test_stuff.feature", "test/faked_project/lib/faked_project.rb", "test/faked_project/lib/faked_project/framework_specific.rb", "test/faked_project/lib/faked_project/meta_magic.rb", "test/faked_project/lib/faked_project/some_class.rb", "test/faked_project/spec/faked_spec.rb", "test/faked_project/spec/meta_magic_spec.rb", "test/faked_project/spec/some_class_spec.rb", "test/faked_project/spec/spec_helper.rb", "test/faked_project/test/faked_test.rb", "test/faked_project/test/meta_magic_test.rb", "test/faked_project/test/some_class_test.rb", "test/faked_project/test/test_helper.rb", "test/fixtures/app/controllers/sample_controller.rb", "test/fixtures/app/models/user.rb", "test/fixtures/deleted_source_sample.rb", "test/fixtures/frameworks/rspec_bad.rb", "test/fixtures/frameworks/rspec_good.rb", "test/fixtures/frameworks/testunit_bad.rb", "test/fixtures/frameworks/testunit_good.rb", "test/fixtures/resultset1.rb", "test/fixtures/resultset2.rb", "test/fixtures/sample.rb", "test/helper.rb", "test/shoulda_macros.rb", "test/test_1_8_fallbacks.rb", "test/test_command_guesser.rb", "test/test_deleted_source.rb", "test/test_file_list.rb", "test/test_filters.rb", "test/test_merge_helpers.rb", "test/test_result.rb", "test/test_return_codes.rb", "test/test_source_file.rb", "test/test_source_file_line.rb"] s.homepage = %q{http://github.com/colszowka/simplecov} s.require_paths = ["lib"] s.rubyforge_project = %q{simplecov} s.rubygems_version = %q{1.3.6} s.summary = %q{Code coverage for Ruby 1.9 with a powerful configuration library and automatic merging of coverage across test suites} s.test_files = ["features/config_adapters.feature", "features/config_autoload.feature", "features/config_command_name.feature", "features/config_coverage_dir.feature", "features/config_deactivate_merging.feature", "features/config_merge_timeout.feature", "features/config_project_name.feature", "features/config_styles.feature", "features/cucumber_basic.feature", "features/merging_test_unit_and_rspec.feature", "features/rspec_basic.feature", "features/rspec_groups_and_filters_basic.feature", "features/rspec_groups_and_filters_complex.feature", "features/rspec_without_simplecov.feature", "features/step_definitions/html_steps.rb", "features/step_definitions/simplecov_steps.rb", "features/step_definitions/transformers.rb", "features/step_definitions/web_steps.rb", "features/support/env.rb", "features/test_unit_basic.feature", "features/test_unit_groups_and_filters_basic.feature", "features/test_unit_groups_and_filters_complex.feature", "features/test_unit_without_simplecov.feature", "test/faked_project/Gemfile", "test/faked_project/Rakefile", "test/faked_project/cucumber.yml", "test/faked_project/features/step_definitions/my_steps.rb", "test/faked_project/features/support/env.rb", "test/faked_project/features/test_stuff.feature", "test/faked_project/lib/faked_project.rb", "test/faked_project/lib/faked_project/framework_specific.rb", "test/faked_project/lib/faked_project/meta_magic.rb", "test/faked_project/lib/faked_project/some_class.rb", "test/faked_project/spec/faked_spec.rb", "test/faked_project/spec/meta_magic_spec.rb", "test/faked_project/spec/some_class_spec.rb", "test/faked_project/spec/spec_helper.rb", "test/faked_project/test/faked_test.rb", "test/faked_project/test/meta_magic_test.rb", "test/faked_project/test/some_class_test.rb", "test/faked_project/test/test_helper.rb", "test/fixtures/app/controllers/sample_controller.rb", "test/fixtures/app/models/user.rb", "test/fixtures/deleted_source_sample.rb", "test/fixtures/frameworks/rspec_bad.rb", "test/fixtures/frameworks/rspec_good.rb", "test/fixtures/frameworks/testunit_bad.rb", "test/fixtures/frameworks/testunit_good.rb", "test/fixtures/resultset1.rb", "test/fixtures/resultset2.rb", "test/fixtures/sample.rb", "test/helper.rb", "test/shoulda_macros.rb", "test/test_1_8_fallbacks.rb", "test/test_command_guesser.rb", "test/test_deleted_source.rb", "test/test_file_list.rb", "test/test_filters.rb", "test/test_merge_helpers.rb", "test/test_result.rb", "test/test_return_codes.rb", "test/test_source_file.rb", "test/test_source_file_line.rb"] if s.respond_to? :specification_version then current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION s.specification_version = 3 if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then s.add_runtime_dependency(%q<simplecov-html>, ["~> 0.5.0"]) s.add_development_dependency(%q<aruba>, [">= 0.4.5"]) s.add_development_dependency(%q<capybara>, ["~> 1.0.0"]) s.add_development_dependency(%q<cucumber>, ["~> 1.0.0"]) s.add_development_dependency(%q<rake>, ["<= 0.9.0"]) s.add_development_dependency(%q<rspec>, [">= 2.6.0"]) s.add_development_dependency(%q<shoulda>, ["#<YAML::Syck::DefaultKey:0x10dd4fec8> 2.10.3"]) else s.add_dependency(%q<simplecov-html>, ["~> 0.5.0"]) s.add_dependency(%q<aruba>, [">= 0.4.5"]) s.add_dependency(%q<capybara>, ["~> 1.0.0"]) s.add_dependency(%q<cucumber>, ["~> 1.0.0"]) s.add_dependency(%q<rake>, ["<= 0.9.0"]) s.add_dependency(%q<rspec>, [">= 2.6.0"]) s.add_dependency(%q<shoulda>, ["#<YAML::Syck::DefaultKey:0x10dd4fec8> 2.10.3"]) end else s.add_dependency(%q<simplecov-html>, ["~> 0.5.0"]) s.add_dependency(%q<aruba>, [">= 0.4.5"]) s.add_dependency(%q<capybara>, ["~> 1.0.0"]) s.add_dependency(%q<cucumber>, ["~> 1.0.0"]) s.add_dependency(%q<rake>, ["<= 0.9.0"]) s.add_dependency(%q<rspec>, [">= 2.6.0"]) s.add_dependency(%q<shoulda>, ["#<YAML::Syck::DefaultKey:0x10dd4fec8> 2.10.3"]) endendWARNING: Invalid .gemspec format in '/Library/Ruby/Gems/1.8/specifications/simplecov-0.5.0.gemspec'NOTE: Gem.source_index is deprecated, use Specification. It will be removed on or after 2011-11-01.Gem.source_index called from /Library/Ruby/Gems/1.8/gems/bundler-1.0.10/lib/bundler/shared_helpers.rb:3.git://github.com/ryanb/nested_form.git (at master) is not checked out. Please run `bundle install`Running gem pristine --all --no-extensions: running fine until rails:Restored rack-mount-0.8.2Restored rack-openid-1.3.1Restored rack-ssl-1.3.2Restored rack-test-0.6.1ERROR: While executing gem ... (Errno::EACCES) Permission denied - /Users/me/.rvm/gems/ruby-1.9.2-p290/gems/rails-3.1.0/bin/rails 解决方案 Did you try:bundle installAnd:bundle exec rails s 这篇关于Rails S无法启动服务器:找不到导轨(> = 0)?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 上岸,阿里云! 09-03 17:46