2016-12-18 6 views
1

私はRails 4.2.7を使用しています。私がインストールしたRuby 2.3.0バージョンではなく、Ruby 2.1.6を使用する必要があるという例をダウンロードしました...Rubyをインストールしましたが、 "bundle install"が動作しません。

localhost:lti_tool_provider_example-master davea$ bundle install 
Your Ruby version is 2.3.0, but your Gemfile specified 2.1.6 

これは私のやり方です。しかし、Rubyの2.1.6をインストールした後、今では動作しません「をバンドルは、インストール」...私はちょうどインストールRubyの2.1.3バージョンに干渉することなく、「バンドル」コマンドを復元するにはどうすればよい

localhost:lti_tool_provider_example-master davea$ rvm install ruby-2.1.6 
Warning! PATH is not properly set up, '/Users/davea/.rvm/gems/ruby-2.3.0/bin' is not at first place, 
     usually this is caused by shell initialization files - check them for 'PATH=...' entries, 
     it might also help to re-add RVM to your dotfiles: 'rvm get stable --auto-dotfiles', 
     to fix temporarily in this shell session run: 'rvm use ruby-2.3.0'. 
Warning, new version of rvm available '1.27.0', you are using older version '1.26.11'. 
You can disable this warning with: echo rvm_autoupdate_flag=0 >> ~/.rvmrc 
You can enable auto-update with: echo rvm_autoupdate_flag=2 >> ~/.rvmrc 
Searching for binary rubies, this might take some time. 
Found remote file https://rubies.travis-ci.org/osx/10.12/x86_64/ruby-2.1.6.tar.bz2 
Checking requirements for osx. 
Certificates in '/usr/local/etc/openssl/cert.pem' are already up to date. 
Requirements installation successful. 
ruby-2.1.6 - #configure 
ruby-2.1.6 - #download 
    % Total % Received % Xferd Average Speed Time Time  Time Current 
           Dload Upload Total Spent Left Speed 
    0  0 0  0 0  0  0  0 --:--:-- --:--:-- --:--:--  0 
100 7630k 100 7630k 0  0 1199k  0 0:00:06 0:00:06 --:--:-- 1551k 
No checksum for downloaded archive, recording checksum in user configuration. 
ruby-2.1.6 - #validate archive 
ruby-2.1.6 - #extract 
ruby-2.1.6 - #validate binary 
Libraries missing for ruby-2.1.6: cannot. Refer to your system manual for installing libraries 
Mounting remote ruby failed with status 10, trying to compile. 
Checking requirements for osx. 
Certificates in '/usr/local/etc/openssl/cert.pem' are already up to date. 
Requirements installation successful. 
Warning: DYLD_LIBRARY_PATH environment variable is set, this might interact with the compilation and ruby. 
Installing Ruby from source to: /Users/davea/.rvm/rubies/ruby-2.1.6, this may take a while depending on your cpu(s)... 
ruby-2.1.6 - #downloading ruby-2.1.6, this may take a while depending on your connection... 
    % Total % Received % Xferd Average Speed Time Time  Time Current 
           Dload Upload Total Spent Left Speed 
100 11.4M 100 11.4M 0  0 2272k  0 0:00:05 0:00:05 --:--:-- 2354k 
No checksum for downloaded archive, recording checksum in user configuration. 
ruby-2.1.6 - #extracting ruby-2.1.6 to /Users/davea/.rvm/src/ruby-2.1.6.... 
ruby-2.1.6 - #configuring.................................................... 
ruby-2.1.6 - #post-configuration. 
ruby-2.1.6 - #compiling....................................................................................................................................... 
ruby-2.1.6 - #installing............... 
ruby-2.1.6 - #making binaries executable.. 
ruby-2.1.6 - #downloading rubygems-2.4.8 
ruby-2.1.6 - #extracting rubygems-2.4.8..... 
ruby-2.1.6 - #removing old rubygems......... 
ruby-2.1.6 - #installing rubygems-2.4.8...................... 
ruby-2.1.6 - #gemset created /Users/davea/.rvm/gems/[email protected] 
ruby-2.1.6 - #importing gemset /Users/davea/.rvm/gemsets/global.gems............................................... 
ruby-2.1.6 - #generating global wrappers........ 
ruby-2.1.6 - #gemset created /Users/davea/.rvm/gems/ruby-2.1.6 
ruby-2.1.6 - #importing gemsetfile /Users/davea/.rvm/gemsets/default.gems evaluated to empty gem list 
ruby-2.1.6 - #generating default wrappers........ 
ruby-2.1.6 - #adjusting #shebangs for (gem irb erb ri rdoc testrb rake). 
Install of ruby-2.1.6 - #complete 
Ruby was built without documentation, to build it run: rvm docs generate-ri 
localhost:lti_tool_provider_example-master davea$ bundle install 
-bash: bundle: command not found 

?それは干渉しないので、これはルビー2.1.6をする特定のgemsetにインストールされます

rvm use ruby-2.1.6 
gem install bundler 

+1

GemfileでRubyのバージョンを指定した行を削除して、あなたのバージョンで正常に動作するかどうかを確認することもできます。 –

答えて

3

バンドルは、Rubyを2.1.6

は、あなただけのbundlerをインストールする必要がありますruby-2.3.0でインストールしたもの。必要な宝石をインストールするには

bundle install 

をご利用ください。またRubyの2.3.0

にしようと

、あなたはちょうどあなたが

ruby '2.1.6' 

ラインを変更したり、Gemfileからそれを削除するのいずれかによって、ルビー-2.3.0でダウンロードした例を試みることができます。

関連する問題