#33 楼 @rei
Your bundle is complete!
Gems in the groups test and rmagick were not installed.
It was installed into ./vendor/cache
[*****@v125010146 wtn]$ sh restart.sh
/var/wtn/vendor/cache/ruby/2.0.0/gems/thin-1.6.2/lib/thin.rb:39:in require': libruby.so.2.0: cannot open shared object file: No such file or directory - /var/wtn/vendor/cache/ruby/2.0.0/gems/thin-1.6.2/lib/thin_parser.so (LoadError)
from /var/wtn/vendor/cache/ruby/2.0.0/gems/thin-1.6.2/lib/thin.rb:39:in
'
from /var/wtn/vendor/cache/ruby/2.0.0/gems/thin-1.6.2/bin/thin:5:in require'
from /var/wtn/vendor/cache/ruby/2.0.0/gems/thin-1.6.2/bin/thin:5:in
'
from /var/wtn/vendor/cache/ruby/2.0.0/bin/thin:23:in load'
from /var/wtn/vendor/cache/ruby/2.0.0/bin/thin:23:in
bundle install 似乎成功了
#33 楼 @rei 改了,似乎有效的。多了一行 ruby.taobao.org $ bundle install (eval):9: warning: already initialized constant Bundler::Dsl::RAILS_VERSION_IS_3 (eval):9: warning: previous definition of RAILS_VERSION_IS_3 was here (eval):9: warning: already initialized constant Bundler::Dsl::RAILS_VERSION_IS_3 (eval):9: warning: previous definition of RAILS_VERSION_IS_3 was here Fetching source index from http://ruby.taobao.org/ Fetching source index from http://ruby.taobao.org/ Fetching source index from https://rubygems.org/
#28 楼 @rei [**@v125010146 wtn]$ sudo vim Gemfile.lock [**@v125010146 wtn]$ bundle install (eval):9: warning: already initialized constant Bundler::Dsl::RAILS_VERSION_IS_3 (eval):9: warning: previous definition of RAILS_VERSION_IS_3 was here (eval):9: warning: already initialized constant Bundler::Dsl::RAILS_VERSION_IS_3 (eval):9: warning: previous definition of RAILS_VERSION_IS_3 was here Fetching source index from http://ruby.taobao.org/ Fetching source index from https://rubygems.org/ 似乎还是卡在这里了
#26 楼 @rei 就是照着 ruby.taobao.org 做的,gem sources -l 也只有 *** CURRENT SOURCES ***
[*****@v125010146 wtn]$ bundle install
(eval):9: warning: already initialized constant Bundler::Dsl::RAILS_VERSION_IS_3
(eval):9: warning: previous definition of RAILS_VERSION_IS_3 was here
(eval):9: warning: already initialized constant Bundler::Dsl::RAILS_VERSION_IS_3
(eval):9: warning: previous definition of RAILS_VERSION_IS_3 was here
Fetching source index from http://ruby.taobao.org/
Fetching source index from https://rubygems.org/
Could not fetch specs from https://rubygems.org/
我看 Gemfile.lock 里还有这几行
GEM
remote: http://ruby.taobao.org/
remote: https://rubygems.org/
remote: https://rubygems.org/
是不是要删掉
#20 楼 @rei [*****@v125010146 wtn]$ cat Gemfile.lock GEM remote: http://ruby.taobao.org/ remote: https://rubygems.org/ remote: https://rubygems.org/ specs: ZenTest (4.5.0) actionmailer (3.2.13) actionpack (= 3.2.13) mail (~> 2.5.3) actionpack (3.2.13) activemodel (= 3.2.13)
[*****@v125010146 wtn]$ cat Gemfile source 'http://ruby.taobao.org'
gem "rails", "3.2.13" gem "jquery-rails", "~> 2.0.2" gem "i18n", "~> 0.6.0" gem "coderay", "~> 1.0.6"
#20 楼 @rei [*****@v125010146 wtn]$ source 'https://ruby.taobao.org/' -bash: https://ruby.taobao.org/: No such file or directory
#18 楼 @rei [**@v125010146 wtn]$ rm vendor/cache/ruby/2.0.0/gems/eventmachine-1.0.3/ -rf [@v125010146 wtn]$ rm vendor/cache/ruby/2.0.0/specifications/eventmachine-1.0.3.gemspec [***@v125010146 wtn]$ bundle install (eval):9: warning: already initialized constant Bundler::Dsl::RAILS_VERSION_IS_3 (eval):9: warning: previous definition of RAILS_VERSION_IS_3 was here (eval):9: warning: already initialized constant Bundler::Dsl::RAILS_VERSION_IS_3 (eval):9: warning: previous definition of RAILS_VERSION_IS_3 was here Fetching source index from http://ruby.taobao.org/ Fetching source index from https://rubygems.org/
卡在这里了,可能是被墙
我设置的 sourcr 是淘宝的镜像
gem uninstall xxx 正常情况下会给出一些信息反馈的么?比如成功了或失败了
*****@v125010146 wtn]$ gem uninstall eventmachine
[*****@v125010146 wtn]$ bundle install
(eval):9: warning: already initialized constant Bundler::Dsl::RAILS_VERSION_IS_3
(eval):9: warning: previous definition of RAILS_VERSION_IS_3 was here
(eval):9: warning: already initialized constant Bundler::Dsl::RAILS_VERSION_IS_3
(eval):9: warning: previous definition of RAILS_VERSION_IS_3 was here
Using rake (10.3.2)
Using i18n (0.6.1)
Using multi_json (1.10.1)
Using activesupport (3.2.13)
Using builder (3.0.0)
Using activemodel (3.2.13)
Using erubis (2.7.0)
Using journey (1.0.4)
Using rack (1.4.5)
Using rack-cache (1.2)
Using rack-test (0.6.2)
Using hike (1.2.3)
Using tilt (1.4.1)
Using sprockets (2.2.2)
Using actionpack (3.2.13)
Using mime-types (1.25.1)
Using polyglot (0.3.5)
Using treetop (1.4.15)
Using mail (2.5.4)
Using actionmailer (3.2.13)
Using arel (3.0.3)
Using tzinfo (0.3.41)
Using activerecord (3.2.13)
Using activeresource (3.2.13)
Using coderay (1.0.9)
Using daemons (1.1.9)
Using eventmachine (1.0.3)
Using holidays (1.0.6)
Using multi_xml (0.5.5)
Using httparty (0.11.0)
Using icalendar (2.1.1)
Using inifile (3.0.0)
Using rack-ssl (1.3.4)
Using json (1.8.1)
Using rdoc (3.12.2)
Using thor (0.19.1)
Using railties (3.2.13)
Using jquery-rails (2.0.3)
Using mysql2 (0.3.16)
Using net-ldap (0.3.1)
Using nokogiri (1.5.11)
Using open-uri-cached (0.0.5)
Using pdf-core (0.2.5)
Using ttfunk (1.2.0)
Using prawn (1.2.1)
Using ruby-openid (2.1.8)
Using rack-openid (1.4.2)
Using bundler (1.3.5)
Using rails (3.2.13)
Using redcarpet (3.1.2)
Using thin (1.6.2)
Using yard (0.8.7.4)
Updating files in vendor/cache
Your bundle is complete!
Gems in the groups test and rmagick were not installed.
It was installed into ./vendor/cache
gem uninstall eventmachine 执行后没有任何提示反馈
#10 楼 @rei 这是我再 stack 上提的问题,也有人回复了,http://stackoverflow.com/questions/30682575/rails-v-got-error-already-initialized-constant
我换另一种方式尝试启动:
[****@v125010146 wtn]$ bundle exec ruby script/rails server webrick -e production
(eval):9: warning: already initialized constant Bundler::Dsl::RAILS_VERSION_IS_3
(eval):9: warning: previous definition of RAILS_VERSION_IS_3 was here
(eval):9: warning: already initialized constant Bundler::Dsl::RAILS_VERSION_IS_3
(eval):9: warning: previous definition of RAILS_VERSION_IS_3 was here
Unable to load the EventMachine C extension; To use the pure-ruby reactor, require 'em/pure_ruby'
/var/wtn/vendor/cache/ruby/2.0.0/gems/eventmachine-1.0.3/lib/eventmachine.rb:8:in `require': libruby.so.2.0: cannot open shared object file: No such file or directory - /var/wtn/vendor/cache/ruby/2.0.0/gems/eventmachine-1.0.3/lib/rubyeventmachine.so (LoadError)
from /var/wtn/vendor/cache/ruby/2.0.0/gems/eventmachine-1.0.3/lib/eventmachine.rb:8:in `<top (required)>'
from /var/wtn/vendor/cache/ruby/2.0.0/gems/thin-1.6.2/lib/thin.rb:7:in `require'
from /var/wtn/vendor/cache/ruby/2.0.0/gems/thin-1.6.2/lib/thin.rb:7:in `<top (required)>'
from /usr/local/lib/ruby/gems/2.0.0/gems/bundler-1.3.5/lib/bundler/runtime.rb:72:in `require'
from /usr/local/lib/ruby/gems/2.0.0/gems/bundler-1.3.5/lib/bundler/runtime.rb:72:in `block (2 levels) in require'
from /usr/local/lib/ruby/gems/2.0.0/gems/bundler-1.3.5/lib/bundler/runtime.rb:70:in `each'
from /usr/local/lib/ruby/gems/2.0.0/gems/bundler-1.3.5/lib/bundler/runtime.rb:70:in `block in require'
from /usr/local/lib/ruby/gems/2.0.0/gems/bundler-1.3.5/lib/bundler/runtime.rb:59:in `each'
from /usr/local/lib/ruby/gems/2.0.0/gems/bundler-1.3.5/lib/bundler/runtime.rb:59:in `require'
from /usr/local/lib/ruby/gems/2.0.0/gems/bundler-1.3.5/lib/bundler.rb:132:in `require'
from /var/wtn/config/application.rb:7:in `<top (required)>'
from /var/wtn/vendor/cache/ruby/2.0.0/gems/railties-3.2.13/lib/rails/commands.rb:53:in `require'
from /var/wtn/vendor/cache/ruby/2.0.0/gems/railties-3.2.13/lib/rails/commands.rb:53:in `block in <top (required)>'
from /var/wtn/vendor/cache/ruby/2.0.0/gems/railties-3.2.13/lib/rails/commands.rb:50:in `tap'
from /var/wtn/vendor/cache/ruby/2.0.0/gems/railties-3.2.13/lib/rails/commands.rb:50:in `<top (required)>'
from script/rails:6:in `require'
from script/rails:6:in `<main>'
#105 楼 @vincenttone 说的真好,这才是社区的精神!
12 睡 9 起
已阅