2017-06-16 93 views
0

我以前用ruby和rails下載了rvm,但是它提出了一個我無法解決的問題,所以我拿了寶石並在rvm中崩潰,但現在我要求安裝它沒有的紅寶石,當我給它一個紅寶石-v出現,已經安裝,版本2.4.1,版本4.2.6軌道也是如此。我做的事?發生了什麼?Rvm install ruby​​-2.4.1

rvm install ruby-2.4.1 
Searching for binary rubies, this might take some time. 
Found remote file https://rvm_io.global.ssl.fastly.net/binaries/ubuntu/16.04/x86_64/ruby-2.4.1.tar.bz2 
Checking requirements for ubuntu. 
Installing requirements for ubuntu. 
Updating system.. 
Installing required packages: gawk, libyaml-dev, autoconf, libgdbm-dev, libncurses5-dev, automake, bison, libffi-dev.... 
Error running 'requirements_debian_libs_install gawk libyaml-dev autoconf libgdbm-dev libncurses5-dev automake bison libffi-dev', 
showing last 15 lines of /usr/local/rvm/log/1497634607_ruby-2.4.1/package_install_gawk_libyaml-dev_autoconf_libgdbm-dev_libncurses5-dev_automake_bison_libffi-dev.log 
  autoconf-archive gnu-standards autoconf-doc bison-doc gawk-doc ncurses-doc 
  libyaml-doc 
The following NEW packages will be installed: 
  autoconf automake bison gawk libbison-dev libffi-dev libgdbm-dev 
  libncurses5-dev libsigsegv2 libyaml-dev m4 
0 upgraded, 11 newly installed, 0 to remove and 13 not upgraded. 
Need to get 0 B/2,462 kB of archives. 
After this operation, 9,047 kB of additional disk space will be used. 
dpkg: warning: 'ldconfig' not found in PATH or not executable 
dpkg: warning: 'start-stop-daemon' not found in PATH or not executable 
dpkg: error: 2 expected programs not found in PATH or not executable 
Note: root's PATH should usually contain /usr/local/sbin, /usr/sbin and /sbin 
E: Sub-process /usr/bin/dpkg returned an error code (2) 
++ return 100 
++ return 100 
Requirements installation failed with status: 100. 

[email protected]:~# ruby -v 
ruby 2.4.1p111 (2017-03-22 revision 58053) [x86_64-linux-gnu] 
[email protected]:~# rails -v 
Rails 4.2.6 
+0

我解決了這個錯誤,我把Gemfile中的'寶石「OpenSSL的」,「2.0.4''但現在改變了錯誤, –

+0

root @ ubuntu:〜/ teste#rails s =>引導WEBrick => Rails 4.2.6應用程序從http:// localhost:3000開始開發 =>運行'rails server -h' for更多啓動選項 => Ctrl-C關閉服務器 /usr/lib/ruby​​/vendor_ruby/active_support/cor e_ext/numeric/conversions.rb:121:warning:constant :: Fixnum已棄用 /usr/lib/ruby/vendor_ruby/active_support/core_ext/numeric/conversions.rb:121:warning:constant :: Bignum已棄用 退出' –

+0

/usr/lib/ruby/vendor_ruby/active_support/core_ext/numeric/conversions.rb:124:in 中的塊(2級):來自/ usr/lib的堆棧級別太深(SystemStackError) /ruby/vendor_ruby/active_support/core_ext/numeric/conversions.rb:131:in '...中的塊(2級).../usr/local/lib/site_ruby中的4462級別... /2.4.0/ruby​​gems/core_ext/kernel_require.rb:68:'require' from/root/teste/bin/spring:15:in'' from bin/rails:3:in'從bin/rails加載' :3:在'

' –

回答

0

我通過改變軌道的版本,這樣就避開了問題:

# Bundle edge Rails instead: gem 'rails', github: 'rails/rails' 
gem 'rails', github: 'rails/rails', branch: '4-2-stable'