Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/ruby-on-rails/63.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ruby on rails 我一直收到这个错误';Bundler找不到gem的兼容版本;捆扎机:';_Ruby On Rails_Gem_Bundler - Fatal编程技术网

Ruby on rails 我一直收到这个错误';Bundler找不到gem的兼容版本;捆扎机:';

Ruby on rails 我一直收到这个错误';Bundler找不到gem的兼容版本;捆扎机:';,ruby-on-rails,gem,bundler,Ruby On Rails,Gem,Bundler,我正在运行Ruby1.9.3和Rails4.0.0,我刚刚开始学习如何使用RubyonRails。每当我键入运行服务器的命令时: $ rails s 我得到这个错误: Bundler could not find compatible versions for gem "bundler": In Gemfile: rails (= 4.0.0) depends on bundler (< 2.0, >= 1.3.0) Current B

我正在运行Ruby1.9.3和Rails4.0.0,我刚刚开始学习如何使用RubyonRails。每当我键入运行服务器的命令时:

    $ rails s
我得到这个错误:

Bundler could not find compatible versions for gem "bundler":
    In Gemfile:
     rails (= 4.0.0) depends on
      bundler (< 2.0, >= 1.3.0)

   Current Bundler version:
     bundler (1.0.15)
这就是我得到的结果:

    *** LOCAL GEMS ***

    bundler (1.3.5, 1.3.0)

尽管它这么说,我还是继续得到上面提到的错误。有人知道怎么解决这个问题吗?谢谢

您可能需要在其前面加上
bundle exec

bundle exec rails server

您可以使用检查绑定器的版本

bundle -v
在前面使用
bundle exec
作为rails/rake命令的前缀将确保ruby使用应用程序所需的gems

bundle exec rails s
bundle exec rails s