如何将应用程序从Ruby 2.0.0降级到1.9.3

时间:2014-01-10 16:53:17

标签: ruby-on-rails ruby

我的应用程序使用的是Ruby 2.0.0-p247,但我需要降级到1.9.3(对我的应用程序至关重要的自定义模块在2.0.0中不起作用,但在1.9.3中起作用)。

为此,我用

更新了我的gemfile
ruby '1.9.3'
在我输入的命令行中输入

rvm use 1.9.3

我还编辑了.ruby-version文件,并将其替换为:

1.9.3

我运行了bundle install,然后输入:

尝试启动应用程序
rails s

它尝试启动但后来给出了一个分段错误(很长一段时间以来我看到其中一个)。输出的错误粘贴在下面。

            /Users/taimoor/railsdev/connect/vendor/bundle/gems/json-1.8.1/lib/json/common.rb:67: [BUG] Segmentation fault
            ruby 1.9.3p448 (2013-06-27 revision 41675) [x86_64-darwin12.4.0]

            -- Control frame information -----------------------------------------------
            c:0048 p:---- s:0137 b:0137 l:000136 d:000136 CFUNC  :initialize
            c:0047 p:---- s:0135 b:0135 l:000134 d:000134 CFUNC  :new
            c:0046 p:0099 s:0132 b:0130 l:000129 d:000129 METHOD /Users/taimoor/railsdev/connect/vendor/bundle/gems/json-1.8.1/lib/json/common.rb:67
            c:0045 p:0090 s:0121 b:0120 l:000119 d:000119 CLASS  /Users/taimoor/railsdev/connect/vendor/bundle/gems/json-1.8.1/lib/json/ext.rb:17
            c:0044 p:0011 s:0118 b:0118 l:000117 d:000117 CLASS  /Users/taimoor/railsdev/connect/vendor/bundle/gems/json-1.8.1/lib/json/ext.rb:12
            c:0043 p:0074 s:0116 b:0116 l:000115 d:000115 TOP    /Users/taimoor/railsdev/connect/vendor/bundle/gems/json-1.8.1/lib/json/ext.rb:9
            c:0042 p:---- s:0114 b:0114 l:000113 d:000113 FINISH
            c:0041 p:---- s:0112 b:0112 l:000111 d:000111 CFUNC  :require
            c:0040 p:0027 s:0108 b:0108 l:000107 d:000107 CLASS  /Users/taimoor/railsdev/connect/vendor/bundle/gems/json-1.8.1/lib/json.rb:58
            c:0039 p:0021 s:0106 b:0106 l:000105 d:000105 TOP    /Users/taimoor/railsdev/connect/vendor/bundle/gems/json-1.8.1/lib/json.rb:54
            c:0038 p:---- s:0104 b:0104 l:000103 d:000103 FINISH
            c:0037 p:---- s:0102 b:0102 l:000101 d:000101 CFUNC  :require
            c:0036 p:0013 s:0098 b:0098 l:000097 d:000097 TOP    /Users/taimoor/railsdev/connect/vendor/bundle/gems/activesupport-4.0.0/lib/active_support/core_ext/object/to_json.rb:3
            c:0035 p:---- s:0096 b:0096 l:000095 d:000095 FINISH
            c:0034 p:---- s:0094 b:0094 l:000093 d:000093 CFUNC  :require
            c:0033 p:0107 s:0090 b:0090 l:000089 d:000089 TOP    /Users/taimoor/railsdev/connect/vendor/bundle/gems/activesupport-4.0.0/lib/active_support/core_ext/object.rb:11
            c:0032 p:---- s:0088 b:0088 l:000087 d:000087 FINISH
            c:0031 p:---- s:0086 b:0086 l:000085 d:000085 CFUNC  :require
            c:0030 p:0035 s:0082 b:0082 l:000081 d:000081 TOP    /Users/taimoor/railsdev/connect/vendor/bundle/gems/railties-4.0.0/lib/rails/configuration.rb:3
            c:0029 p:---- s:0080 b:0080 l:000079 d:000079 FINISH
            c:0028 p:---- s:0078 b:0078 l:000077 d:000077 CFUNC  :require
            c:0027 p:0023 s:0074 b:0074 l:000073 d:000073 TOP    /Users/taimoor/railsdev/connect/vendor/bundle/gems/railties-4.0.0/lib/rails/railtie.rb:2
            c:0026 p:---- s:0072 b:0072 l:000071 d:000071 FINISH
            c:0025 p:---- s:0070 b:0070 l:000069 d:000069 CFUNC  :require
            c:0024 p:0011 s:0066 b:0066 l:000065 d:000065 TOP    /Users/taimoor/railsdev/connect/vendor/bundle/gems/railties-4.0.0/lib/rails/engine.rb:1
            c:0023 p:---- s:0064 b:0064 l:000063 d:000063 FINISH
            c:0022 p:---- s:0062 b:0062 l:000061 d:000061 CFUNC  :require
            c:0021 p:0047 s:0058 b:0058 l:000057 d:000057 TOP    /Users/taimoor/railsdev/connect/vendor/bundle/gems/railties-4.0.0/lib/rails/application.rb:4
            c:0020 p:---- s:0056 b:0056 l:000055 d:000055 FINISH
            c:0019 p:---- s:0054 b:0054 l:000053 d:000053 CFUNC  :require
            c:0018 p:0071 s:0050 b:0050 l:000049 d:000049 TOP    /Users/taimoor/railsdev/connect/vendor/bundle/gems/railties-4.0.0/lib/rails.rb:9
            c:0017 p:---- s:0048 b:0048 l:000047 d:000047 FINISH
            c:0016 p:---- s:0046 b:0046 l:000045 d:000045 CFUNC  :require
            c:0015 p:0011 s:0042 b:0042 l:000041 d:000041 TOP    /Users/taimoor/railsdev/connect/vendor/bundle/gems/railties-4.0.0/lib/rails/all.rb:1
            c:0014 p:---- s:0040 b:0040 l:000039 d:000039 FINISH
            c:0013 p:---- s:0038 b:0038 l:000037 d:000037 CFUNC  :require
            c:0012 p:0038 s:0034 b:0034 l:000033 d:000033 TOP    /Users/taimoor/railsdev/connect/config/application.rb:3
            c:0011 p:---- s:0032 b:0032 l:000031 d:000031 FINISH
            c:0010 p:---- s:0030 b:0030 l:000029 d:000029 CFUNC  :require
            c:0009 p:0016 s:0026 b:0026 l:000017 d:000025 BLOCK  /Users/taimoor/railsdev/connect/vendor/bundle/gems/railties-4.0.0/lib/rails/commands.rb:76
            c:0008 p:---- s:0023 b:0023 l:000022 d:000022 FINISH
            c:0007 p:---- s:0021 b:0021 l:000020 d:000020 CFUNC  :tap
            c:0006 p:0793 s:0018 b:0018 l:000017 d:000017 TOP    /Users/taimoor/railsdev/connect/vendor/bundle/gems/railties-4.0.0/lib/rails/commands.rb:73
            c:0005 p:---- s:0012 b:0012 l:000011 d:000011 FINISH
            c:0004 p:---- s:0010 b:0010 l:000009 d:000009 CFUNC  :require
            c:0003 p:0046 s:0006 b:0006 l:002008 d:000498 EVAL   bin/rails:4
            c:0002 p:---- s:0004 b:0004 l:000003 d:000003 FINISH
            c:0001 p:0000 s:0002 b:0002 l:002008 d:002008 TOP   

            -- Ruby level backtrace information ----------------------------------------
            bin/rails:4:in `<main>'
            bin/rails:4:in `require'
            /Users/taimoor/railsdev/connect/vendor/bundle/gems/railties-4.0.0/lib/rails/commands.rb:73:in `<top (required)>'
            /Users/taimoor/railsdev/connect/vendor/bundle/gems/railties-4.0.0/lib/rails/commands.rb:73:in `tap'
            /Users/taimoor/railsdev/connect/vendor/bundle/gems/railties-4.0.0/lib/rails/commands.rb:76:in `block in <top (required)>'
            /Users/taimoor/railsdev/connect/vendor/bundle/gems/railties-4.0.0/lib/rails/commands.rb:76:in `require'
            /Users/taimoor/railsdev/connect/config/application.rb:3:in `<top (required)>'
            /Users/taimoor/railsdev/connect/config/application.rb:3:in `require'
            /Users/taimoor/railsdev/connect/vendor/bundle/gems/railties-4.0.0/lib/rails/all.rb:1:in `<top (required)>'
            /Users/taimoor/railsdev/connect/vendor/bundle/gems/railties-4.0.0/lib/rails/all.rb:1:in `require'
            /Users/taimoor/railsdev/connect/vendor/bundle/gems/railties-4.0.0/lib/rails.rb:9:in `<top (required)>'
            /Users/taimoor/railsdev/connect/vendor/bundle/gems/railties-4.0.0/lib/rails.rb:9:in `require'
            /Users/taimoor/railsdev/connect/vendor/bundle/gems/railties-4.0.0/lib/rails/application.rb:4:in `<top (required)>'
            /Users/taimoor/railsdev/connect/vendor/bundle/gems/railties-4.0.0/lib/rails/application.rb:4:in `require'
            /Users/taimoor/railsdev/connect/vendor/bundle/gems/railties-4.0.0/lib/rails/engine.rb:1:in `<top (required)>'
            /Users/taimoor/railsdev/connect/vendor/bundle/gems/railties-4.0.0/lib/rails/engine.rb:1:in `require'
            /Users/taimoor/railsdev/connect/vendor/bundle/gems/railties-4.0.0/lib/rails/railtie.rb:2:in `<top (required)>'
            /Users/taimoor/railsdev/connect/vendor/bundle/gems/railties-4.0.0/lib/rails/railtie.rb:2:in `require'
            /Users/taimoor/railsdev/connect/vendor/bundle/gems/railties-4.0.0/lib/rails/configuration.rb:3:in `<top (required)>'
            /Users/taimoor/railsdev/connect/vendor/bundle/gems/railties-4.0.0/lib/rails/configuration.rb:3:in `require'
            /Users/taimoor/railsdev/connect/vendor/bundle/gems/activesupport-4.0.0/lib/active_support/core_ext/object.rb:11:in `<top (required)>'
            /Users/taimoor/railsdev/connect/vendor/bundle/gems/activesupport-4.0.0/lib/active_support/core_ext/object.rb:11:in `require'
            /Users/taimoor/railsdev/connect/vendor/bundle/gems/activesupport-4.0.0/lib/active_support/core_ext/object/to_json.rb:3:in `<top (required)>'
            /Users/taimoor/railsdev/connect/vendor/bundle/gems/activesupport-4.0.0/lib/active_support/core_ext/object/to_json.rb:3:in `require'
            /Users/taimoor/railsdev/connect/vendor/bundle/gems/json-1.8.1/lib/json.rb:54:in `<top (required)>'
            /Users/taimoor/railsdev/connect/vendor/bundle/gems/json-1.8.1/lib/json.rb:58:in `<module:JSON>'
            /Users/taimoor/railsdev/connect/vendor/bundle/gems/json-1.8.1/lib/json.rb:58:in `require'
            /Users/taimoor/railsdev/connect/vendor/bundle/gems/json-1.8.1/lib/json/ext.rb:9:in `<top (required)>'
            /Users/taimoor/railsdev/connect/vendor/bundle/gems/json-1.8.1/lib/json/ext.rb:12:in `<module:JSON>'
            /Users/taimoor/railsdev/connect/vendor/bundle/gems/json-1.8.1/lib/json/ext.rb:17:in `<module:Ext>'
            /Users/taimoor/railsdev/connect/vendor/bundle/gems/json-1.8.1/lib/json/common.rb:67:in `generator='
            /Users/taimoor/railsdev/connect/vendor/bundle/gems/json-1.8.1/lib/json/common.rb:67:in `new'
            /Users/taimoor/railsdev/connect/vendor/bundle/gems/json-1.8.1/lib/json/common.rb:67:in `initialize'

            -- C level backtrace information -------------------------------------------

               See Crash Report log file under ~/Library/Logs/CrashReporter or
               /Library/Logs/CrashReporter, for the more detail of.

            -- Other runtime information -----------------------------------------------

            * Loaded script: bin/rails

            * Loaded features:

                0 enumerator.so
                1 /Users/taimoor/.rvm/rubies/ruby-1.9.3-p448/lib/ruby/1.9.1/x86_64-darwin12.4.0/enc/encdb.bundle
                2 /Users/taimoor/.rvm/rubies/ruby-1.9.3-p448/lib/ruby/1.9.1/x86_64-darwin12.4.0/enc/trans/transdb.bundle
                3 /Users/taimoor/.rvm/rubies/ruby-1.9.3-p448/lib/ruby/1.9.1/x86_64-darwin12.4.0/rbconfig.rb
                4 /Users/taimoor/.rvm/rubies/ruby-1.9.3-p448/lib/ruby/site_ruby/1.9.1/rubygems/compatibility.rb
                5 /Users/taimoor/.rvm/rubies/ruby-1.9.3-p448/lib/ruby/site_ruby/1.9.1/rubygems/defaults.rb
                6 /Users/taimoor/.rvm/rubies/ruby-1.9.3-p448/lib/ruby/site_ruby/1.9.1/rubygems/deprecate.rb
                7 /Users/taimoor/.rvm/rubies/ruby-1.9.3-p448/lib/ruby/site_ruby/1.9.1/rubygems/errors.rb
                8 /Users/taimoor/.rvm/rubies/ruby-1.9.3-p448/lib/ruby/site_ruby/1.9.1/rubygems/version.rb
                9 /Users/taimoor/.rvm/rubies/ruby-1.9.3-p448/lib/ruby/site_ruby/1.9.1/rubygems/requirement.rb
               10 /Users/taimoor/.rvm/rubies/ruby-1.9.3-p448/lib/ruby/site_ruby/1.9.1/rubygems/platform.rb
               11 /Users/taimoor/.rvm/rubies/ruby-1.9.3-p448/lib/ruby/site_ruby/1.9.1/rubygems/basic_specification.rb
               12 /Users/taimoor/.rvm/rubies/ruby-1.9.3-p448/lib/ruby/site_ruby/1.9.1/rubygems/stub_specification.rb
               13 /Users/taimoor/.rvm/rubies/ruby-1.9.3-p448/lib/ruby/site_ruby/1.9.1/rubygems/util/stringio.rb
               14 /Users/taimoor/.rvm/rubies/ruby-1.9.3-p448/lib/ruby/site_ruby/1.9.1/rubygems/specification.rb
               15 /Users/taimoor/.rvm/rubies/ruby-1.9.3-p448/lib/ruby/site_ruby/1.9.1/rubygems/exceptions.rb
               16 /Users/taimoor/.rvm/rubies/ruby-1.9.3-p448/lib/ruby/site_ruby/1.9.1/rubygems/core_ext/kernel_gem.rb
               17 /Users/taimoor/.rvm/rubies/ruby-1.9.3-p448/lib/ruby/1.9.1/thread.rb
               18 /Users/taimoor/.rvm/rubies/ruby-1.9.3-p448/lib/ruby/1.9.1/monitor.rb
               19 /Users/taimoor/.rvm/rubies/ruby-1.9.3-p448/lib/ruby/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb
               20 /Users/taimoor/.rvm/rubies/ruby-1.9.3-p448/lib/ruby/site_ruby/1.9.1/rubygems.rb
               21 /Users/taimoor/.rvm/rubies/ruby-1.9.3-p448/lib/ruby/1.9.1/x86_64-darwin12.4.0/pathname.bundle
               22 /Users/taimoor/.rvm/rubies/ruby-1.9.3-p448/lib/ruby/1.9.1/pathname.rb
               23 /Users/taimoor/.rvm/rubies/ruby-1.9.3-p448/lib/ruby/1.9.1/x86_64-darwin12.4.0/io/console.bundle
               24 /Users/taimoor/.rvm/rubies/ruby-1.9.3-p448/lib/ruby/site_ruby/1.9.1/rubygems/user_interaction.rb
               25 /Users/taimoor/.rvm/rubies/ruby-1.9.3-p448/lib/ruby/1.9.1/x86_64-darwin12.4.0/etc.bundle
               26 /Users/taimoor/.rvm/rubies/ruby-1.9.3-p448/lib/ruby/site_ruby/1.9.1/rubygems/config_file.rb
               27 /Users/taimoor/.rvm/gems/ruby-1.9.3-p448@global/gems/bundler-1.3.5/lib/bundler/rubygems_integration.rb
               28 /Users/taimoor/.rvm/rubies/ruby-1.9.3-p448/lib/ruby/site_ruby/1.9.1/rubygems/dependency.rb
               29 /Users/taimoor/.rvm/gems/ruby-1.9.3-p448@global/gems/bundler-1.3.5/lib/bundler/shared_helpers.rb
               30 /Users/taimoor/.rvm/rubies/ruby-1.9.3-p448/lib/ruby/1.9.1/fileutils.rb
               31 /Users/taimoor/.rvm/gems/ruby-1.9.3-p448@global/gems/bundler-1.3.5/lib/bundler/gem_path_manipulation.rb
               32 /Users/taimoor/.rvm/gems/ruby-1.9.3-p448@global/gems/bundler-1.3.5/lib/bundler/gem_helpers.rb
               33 /Users/taimoor/.rvm/gems/ruby-1.9.3-p448@global/gems/bundler-1.3.5/lib/bundler/match_platform.rb
               34 /Users/taimoor/.rvm/gems/ruby-1.9.3-p448@global/gems/bundler-1.3.5/lib/bundler/rubygems_ext.rb
               35 /Users/taimoor/.rvm/gems/ruby-1.9.3-p448@global/gems/bundler-1.3.5/lib/bundler/version.rb
               36 /Users/taimoor/.rvm/gems/ruby-1.9.3-p448@global/gems/bundler-1.3.5/lib/bundler.rb
               37 /Users/taimoor/.rvm/gems/ruby-1.9.3-p448@global/gems/bundler-1.3.5/lib/bundler/settings.rb
               38 /Users/taimoor/.rvm/rubies/ruby-1.9.3-p448/lib/ruby/1.9.1/x86_64-darwin12.4.0/digest.bundle
               39 /Users/taimoor/.rvm/rubies/ruby-1.9.3-p448/lib/ruby/1.9.1/digest.rb
               40 /Users/taimoor/.rvm/rubies/ruby-1.9.3-p448/lib/ruby/1.9.1/x86_64-darwin12.4.0/digest/sha1.bundle
               41 /Users/taimoor/.rvm/rubies/ruby-1.9.3-p448/lib/ruby/1.9.1/set.rb
               42 /Users/taimoor/.rvm/gems/ruby-1.9.3-p448@global/gems/bundler-1.3.5/lib/bundler/definition.rb
               43 /Users/taimoor/.rvm/gems/ruby-1.9.3-p448@global/gems/bundler-1.3.5/lib/bundler/dependency.rb
               44 /Users/taimoor/.rvm/gems/ruby-1.9.3-p448@global/gems/bundler-1.3.5/lib/bundler/ruby_dsl.rb
               45 /Users/taimoor/.rvm/gems/ruby-1.9.3-p448@global/gems/bundler-1.3.5/lib/bundler/dsl.rb
               46 /Users/taimoor/.rvm/gems/ruby-1.9.3-p448@global/gems/bundler-1.3.5/lib/bundler/source.rb
               47 /Users/taimoor/.rvm/rubies/ruby-1.9.3-p448/lib/ruby/1.9.1/uri/common.rb
               48 /Users/taimoor/.rvm/rubies/ruby-1.9.3-p448/lib/ruby/1.9.1/uri/generic.rb
               49 /Users/taimoor/.rvm/rubies/ruby-1.9.3-p448/lib/ruby/1.9.1/uri/ftp.rb
               50 /Users/taimoor/.rvm/rubies/ruby-1.9.3-p448/lib/ruby/1.9.1/uri/http.rb
               51 /Users/taimoor/.rvm/rubies/ruby-1.9.3-p448/lib/ruby/1.9.1/uri/https.rb
               52 /Users/taimoor/.rvm/rubies/ruby-1.9.3-p448/lib/ruby/1.9.1/uri/ldap.rb
               53 /Users/taimoor/.rvm/rubies/ruby-1.9.3-p448/lib/ruby/1.9.1/uri/ldaps.rb
               54 /Users/taimoor/.rvm/rubies/ruby-1.9.3-p448/lib/ruby/1.9.1/uri/mailto.rb
               55 /Users/taimoor/.rvm/rubies/ruby-1.9.3-p448/lib/ruby/1.9.1/uri.rb
               56 /Users/taimoor/.rvm/rubies/ruby-1.9.3-p448/lib/ruby/1.9.1/x86_64-darwin12.4.0/socket.bundle
               57 /Users/taimoor/.rvm/rubies/ruby-1.9.3-p448/lib/ruby/1.9.1/socket.rb
               58 /Users/taimoor/.rvm/rubies/ruby-1.9.3-p448/lib/ruby/1.9.1/timeout.rb
               59 /Users/taimoor/.rvm/rubies/ruby-1.9.3-p448/lib/ruby/1.9.1/net/protocol.rb
               60 /Users/taimoor/.rvm/rubies/ruby-1.9.3-p448/lib/ruby/1.9.1/x86_64-darwin12.4.0/zlib.bundle
               61 /Users/taimoor/.rvm/rubies/ruby-1.9.3-p448/lib/ruby/1.9.1/x86_64-darwin12.4.0/stringio.bundle
               62 /Users/taimoor/.rvm/rubies/ruby-1.9.3-p448/lib/ruby/1.9.1/net/http.rb
               63 /Users/taimoor/.rvm/rubies/ruby-1.9.3-p448/lib/ruby/1.9.1/x86_64-darwin12.4.0/date_core.bundle
               64 /Users/taimoor/.rvm/rubies/ruby-1.9.3-p448/lib/ruby/1.9.1/date/format.rb
               65 /Users/taimoor/.rvm/rubies/ruby-1.9.3-p448/lib/ruby/1.9.1/date.rb
               66 /Users/taimoor/.rvm/rubies/ruby-1.9.3-p448/lib/ruby/1.9.1/time.rb
               67 /Users/taimoor/.rvm/rubies/ruby-1.9.3-p448/lib/ruby/site_ruby/1.9.1/rubygems/request.rb
               68 /Users/taimoor/.rvm/rubies/ruby-1.9.3-p448/lib/ruby/1.9.1/cgi/core.rb
               69 /Users/taimoor/.rvm/rubies/ruby-1.9.3-p448/lib/ruby/1.9.1/cgi/cookie.rb
               70 /Users/taimoor/.rvm/rubies/ruby-1.9.3-p448/lib/ruby/1.9.1/cgi/util.rb
               71 /Users/taimoor/.rvm/rubies/ruby-1.9.3-p448/lib/ruby/1.9.1/cgi.rb
               72 /Users/taimoor/.rvm/rubies/ruby-1.9.3-p448/lib/ruby/site_ruby/1.9.1/rubygems/uri_formatter.rb
               73 /Users/taimoor/.rvm/rubies/ruby-1.9.3-p448/lib/ruby/1.9.1/x86_64-darwin12.4.0/fcntl.bundle
               74 /Users/taimoor/.rvm/rubies/ruby-1.9.3-p448/lib/ruby/1.9.1/x86_64-darwin12.4.0/openssl.bundle
               75 /Users/taimoor/.rvm/rubies/ruby-1.9.3-p448/lib/ruby/1.9.1/openssl/bn.rb
               76 /Users/taimoor/.rvm/rubies/ruby-1.9.3-p448/lib/ruby/1.9.1/openssl/cipher.rb
               77 /Users/taimoor/.rvm/rubies/ruby-1.9.3-p448/lib/ruby/1.9.1/openssl/config.rb
               78 /Users/taimoor/.rvm/rubies/ruby-1.9.3-p448/lib/ruby/1.9.1/openssl/digest.rb
               79 /Users/taimoor/.rvm/rubies/ruby-1.9.3-p448/lib/ruby/1.9.1/openssl/buffering.rb
               80 /Users/taimoor/.rvm/rubies/ruby-1.9.3-p448/lib/ruby/1.9.1/openssl/ssl-internal.rb
               81 /Users/taimoor/.rvm/rubies/ruby-1.9.3-p448/lib/ruby/1.9.1/openssl/x509-internal.rb
               82 /Users/taimoor/.rvm/rubies/ruby-1.9.3-p448/lib/ruby/1.9.1/openssl.rb
               83 /Users/taimoor/.rvm/rubies/ruby-1.9.3-p448/lib/ruby/1.9.1/securerandom.rb
               84 /Users/taimoor/.rvm/rubies/ruby-1.9.3-p448/lib/ruby/1.9.1/resolv.rb
               85 /Users/taimoor/.rvm/rubies/ruby-1.9.3-p448/lib/ruby/site_ruby/1.9.1/rubygems/remote_fetcher.rb
               86 /Users/taimoor/.rvm/rubies/ruby-1.9.3-p448/lib/ruby/site_ruby/1.9.1/rubygems/text.rb
               87 /Users/taimoor/.rvm/rubies/ruby-1.9.3-p448/lib/ruby/site_ruby/1.9.1/rubygems/name_tuple.rb
               88 /Users/taimoor/.rvm/rubies/ruby-1.9.3-p448/lib/ruby/site_ruby/1.9.1/rubygems/spec_fetcher.rb
               89 /Users/taimoor/.rvm/gems/ruby-1.9.3-p448@global/gems/bundler-1.3.5/lib/bundler/source/rubygems.rb
               90 /Users/taimoor/.rvm/rubies/ruby-1.9.3-p448/lib/ruby/site_ruby/1.9.1/rubygems/path_support.rb
               91 /Users/taimoor/.rvm/gems/ruby-1.9.3-p448@global/gems/bundler-1.3.5/lib/bundler/ruby_version.rb
               92 /Users/taimoor/.rvm/gems/ruby-1.9.3-p448@global/gems/bundler-1.3.5/lib/bundler/source/path.rb
               93 /Users/taimoor/.rvm/gems/ruby-1.9.3-p448@global/gems/bundler-1.3.5/lib/bundler/source/git.rb
               94 /Users/taimoor/.rvm/rubies/ruby-1.9.3-p448/lib/ruby/1.9.1/x86_64-darwin12.4.0/strscan.bundle
               95 /Users/taimoor/.rvm/gems/ruby-1.9.3-p448@global/gems/bundler-1.3.5/lib/bundler/lockfile_parser.rb
               96 /Users/taimoor/.rvm/gems/ruby-1.9.3-p448@global/gems/bundler-1.3.5/lib/bundler/lazy_specification.rb
               97 /Users/taimoor/.rvm/rubies/ruby-1.9.3-p448/lib/ruby/1.9.1/tsort.rb
               98 /Users/taimoor/.rvm/rubies/ruby-1.9.3-p448/lib/ruby/1.9.1/forwardable.rb
               99 /Users/taimoor/.rvm/gems/ruby-1.9.3-p448@global/gems/bundler-1.3.5/lib/bundler/spec_set.rb
              100 /Users/taimoor/.rvm/gems/ruby-1.9.3-p448@global/gems/bundler-1.3.5/lib/bundler/environment.rb
              101 /Users/taimoor/.rvm/gems/ruby-1.9.3-p448@global/gems/bundler-1.3.5/lib/bundler/runtime.rb
              102 /Users/taimoor/.rvm/gems/ruby-1.9.3-p448@global/gems/bundler-1.3.5/lib/bundler/index.rb
              103 /Users/taimoor/.rvm/gems/ruby-1.9.3-p448@global/gems/bundler-1.3.5/lib/bundler/remote_specification.rb
              104 /Users/taimoor/.rvm/gems/ruby-1.9.3-p448@global/gems/bundler-1.3.5/lib/bundler/endpoint_specification.rb
              105 /Users/taimoor/.rvm/gems/ruby-1.9.3-p448@global/gems/bundler-1.3.5/lib/bundler/source/git/git_proxy.rb
              106 /Users/taimoor/.rvm/gems/ruby-1.9.3-p448@global/gems/bundler-1.3.5/lib/bundler/dep_proxy.rb
              107 /Users/taimoor/.rvm/gems/ruby-1.9.3-p448@global/gems/bundler-1.3.5/lib/bundler/setup.rb
              108 /Users/taimoor/railsdev/connect/config/boot.rb
              109 /Users/taimoor/.rvm/rubies/ruby-1.9.3-p448/lib/ruby/1.9.1/optparse.rb
              110 /Users/taimoor/railsdev/connect/vendor/bundle/gems/thread_safe-0.1.3/lib/thread_safe/version.rb
              111 /Users/taimoor/.rvm/rubies/ruby-1.9.3-p448/lib/ruby/1.9.1/delegate.rb
              112 /Users/taimoor/railsdev/connect/vendor/bundle/gems/thread_safe-0.1.3/lib/thread_safe/synchronized_delegator.rb
              113 /Users/taimoor/railsdev/connect/vendor/bundle/gems/thread_safe-0.1.3/lib/thread_safe.rb
              114 /Users/taimoor/railsdev/connect/vendor/bundle/gems/activesupport-4.0.0/lib/active_support/core_ext/array/prepend_and_append.rb
              115 /Users/taimoor/railsdev/connect/vendor/bundle/gems/activesupport-4.0.0/lib/active_support/core_ext/hash/deep_merge.rb
              116 /Users/taimoor/railsdev/connect/vendor/bundle/gems/activesupport-4.0.0/lib/active_support/core_ext/hash/except.rb
              117 /Users/taimoor/railsdev/connect/vendor/bundle/gems/activesupport-4.0.0/lib/active_support/core_ext/hash/slice.rb
              118 /Users/taimoor/railsdev/connect/vendor/bundle/gems/i18n-0.6.9/lib/i18n/version.rb
              119 /Users/taimoor/railsdev/connect/vendor/bundle/gems/i18n-0.6.9/lib/i18n/exceptions.rb
              120 /Users/taimoor/railsdev/connect/vendor/bundle/gems/i18n-0.6.9/lib/i18n/interpolate/ruby.rb
              121 /Users/taimoor/railsdev/connect/vendor/bundle/gems/i18n-0.6.9/lib/i18n.rb
              122 /Users/taimoor/railsdev/connect/vendor/bundle/gems/activesupport-4.0.0/lib/active_support/lazy_load_hooks.rb
              123 /Users/taimoor/railsdev/connect/vendor/bundle/gems/i18n-0.6.9/lib/i18n/config.rb
              124 /Users/taimoor/railsdev/connect/vendor/bundle/gems/activesupport-4.0.0/lib/active_support/i18n.rb
              125 /Users/taimoor/railsdev/connect/vendor/bundle/gems/thread_safe-0.1.3/lib/thread_safe/non_concurrent_cache_backend.rb
              126 /Users/taimoor/railsdev/connect/vendor/bundle/gems/thread_safe-0.1.3/lib/thread_safe/mri_cache_backend.rb
              127 /Users/taimoor/railsdev/connect/vendor/bundle/gems/thread_safe-0.1.3/lib/thread_safe/cache.rb
              128 /Users/taimoor/railsdev/connect/vendor/bundle/gems/activesupport-4.0.0/lib/active_support/inflector/inflections.rb
              129 /Users/taimoor/railsdev/connect/vendor/bundle/gems/activesupport-4.0.0/lib/active_support/inflections.rb
              130 /Users/taimoor/railsdev/connect/vendor/bundle/gems/activesupport-4.0.0/lib/active_support/inflector/methods.rb
              131 /Users/taimoor/railsdev/connect/vendor/bundle/gems/activesupport-4.0.0/lib/active_support/dependencies/autoload.rb
              132 /Users/taimoor/railsdev/connect/vendor/bundle/gems/activesupport-4.0.0/lib/active_support/version.rb
              133 /Users/taimoor/railsdev/connect/vendor/bundle/gems/activesupport-4.0.0/lib/active_support/core_ext/array/extract_options.rb
              134 /Users/taimoor/railsdev/connect/vendor/bundle/gems/activesupport-4.0.0/lib/active_support/core_ext/class/attribute_accessors.rb
              135 /Users/taimoor/railsdev/connect/vendor/bundle/gems/activesupport-4.0.0/lib/active_support/concern.rb
              136 /Users/taimoor/railsdev/connect/vendor/bundle/gems/activesupport-4.0.0/lib/active_support/logger_silence.rb
              137 /Users/taimoor/.rvm/rubies/ruby-1.9.3-p448/lib/ruby/1.9.1/logger.rb
              138 /Users/taimoor/railsdev/connect/vendor/bundle/gems/activesupport-4.0.0/lib/active_support/logger.rb
              139 /Users/taimoor/railsdev/connect/vendor/bundle/gems/activesupport-4.0.0/lib/active_support.rb
              140 /Users/taimoor/railsdev/connect/vendor/bundle/gems/activesupport-4.0.0/lib/active_support/core_ext/object/blank.rb
              141 /Users/taimoor/railsdev/connect/vendor/bundle/gems/activesupport-4.0.0/lib/active_support/core_ext/kernel/singleton_class.rb
              142 /Users/taimoor/railsdev/connect/vendor/bundle/gems/activesupport-4.0.0/lib/active_support/core_ext/module/remove_method.rb
              143 /Users/taimoor/railsdev/connect/vendor/bundle/gems/activesupport-4.0.0/lib/active_support/core_ext/class/attribute.rb
              144 /Users/taimoor/railsdev/connect/vendor/bundle/gems/activesupport-4.0.0/lib/active_support/core_ext/module/delegation.rb
              145 /Users/taimoor/.rvm/rubies/ruby-1.9.3-p448/lib/ruby/1.9.1/singleton.rb
              146 /Users/taimoor/railsdev/connect/vendor/bundle/gems/activesupport-4.0.0/lib/active_support/deprecation/instance_delegator.rb
              147 /Users/taimoor/railsdev/connect/vendor/bundle/gems/activesupport-4.0.0/lib/active_support/notifications/instrumenter.rb
              148 /Users/taimoor/.rvm/rubies/ruby-1.9.3-p448/lib/ruby/1.9.1/mutex_m.rb
              149 /Users/taimoor/railsdev/connect/vendor/bundle/gems/activesupport-4.0.0/lib/active_support/notifications/fanout.rb
              150 /Users/taimoor/railsdev/connect/vendor/bundle/gems/activesupport-4.0.0/lib/active_support/per_thread_registry.rb
              151 /Users/taimoor/railsdev/connect/vendor/bundle/gems/activesupport-4.0.0/lib/active_support/notifications.rb
              152 /Users/taimoor/railsdev/connect/vendor/bundle/gems/activesupport-4.0.0/lib/active_support/deprecation/behaviors.rb
              153 /Users/taimoor/railsdev/connect/vendor/bundle/gems/activesupport-4.0.0/lib/active_support/deprecation/reporting.rb
              154 /Users/taimoor/railsdev/connect/vendor/bundle/gems/activesupport-4.0.0/lib/active_support/core_ext/module/aliasing.rb
              155 /Users/taimoor/railsdev/connect/vendor/bundle/gems/activesupport-4.0.0/lib/active_support/deprecation/method_wrappers.rb
              156 /Users/taimoor/railsdev/connect/vendor/bundle/gems/activesupport-4.0.0/lib/active_support/deprecation/proxy_wrappers.rb
              157 /Users/taimoor/railsdev/connect/vendor/bundle/gems/activesupport-4.0.0/lib/active_support/core_ext/module/deprecation.rb
              158 /Users/taimoor/railsdev/connect/vendor/bundle/gems/activesupport-4.0.0/lib/active_support/deprecation.rb
              159 /Users/taimoor/railsdev/connect/vendor/bundle/gems/activesupport-4.0.0/lib/active_support/rails.rb
              160 /Users/taimoor/railsdev/connect/vendor/bundle/gems/activesupport-4.0.0/lib/active_support/core_ext/module/attribute_accessors.rb
              161 /Users/taimoor/railsdev/connect/vendor/bundle/gems/actionpack-4.0.0/lib/action_pack/version.rb
              162 /Users/taimoor/railsdev/connect/vendor/bundle/gems/actionpack-4.0.0/lib/action_pack.rb
... ommitting some lines since it exceeded 30,000 characters

            [NOTE]
            You may have encountered a bug in the Ruby interpreter or extension libraries.
            Bug reports are welcome.
            For details: http://www.ruby-lang.org/bugreport.html

            Abort trap: 6

关于我做错的任何想法?我是OSX Mavericks,如果这有助于隔离问题。

1 个答案:

答案 0 :(得分:3)

在您正在使用的版本控制系统中进行提交,以便在需要时可以回滚。您还应该将ruby 1.9.3更新到最新的1.9.3-484。

rvm get stable
rvm upgrade 1.9.3

卸载你的json gem

gem uninstall json

它可能会警告依赖关系,这应该没问题,因为您将重新安装。现在捆绑:

bundle install

您可能必须对其他gem执行此操作,直到在该环境中安装任何具有基于ruby版本的不同版本或依赖项的gem。

修改

因为它不适合你,我可以在Ruby 1.9.3-p484上创建一个Rails 4.0.2应用程序并使用json(1.8.1)运行服务器就好了我会试试这个:

为项目创建一个新目录cd到该目录,然后设置rvm以使用正确的ruby:

rvm use ruby-1.9.3-p484

然后为该gem集安装rails

gem install rails

现在创建一个新的rails应用程序,其名称与旧的相同

rails new ....

然后将所有应用程序的文件复制到新的rails应用程序。我想你可以覆盖一切。 不要复制Gemfile.lock文件。在新应用程序的目录中运行

bundle install

这应该添加你在新环境的宝石集中缺少的任何宝石。