0

更新:

在我的旧应用程序上运行 bundle install 会出现以下错误:

安装 pg (0.12.2)

Gem::Installer::ExtensionBuildError: 错误: 无法构建 gem 原生扩展。

   c:/Users/user/jruby-1.7.4/bin/jruby.exe extconf.rb

NotImplementedError:未启用 C 扩展支持。将 -Xcext.enabled=true 传递给 JRuby > 或设置 JRUBY_OPTS 或修改 .jrubyrc 以启用。

(root) 在 c:/Users/user/jruby-1.7.4/lib/ruby/shared/mkmf.rb:8 需要在 org/jruby/RubyKernel.java:1054 (root) 在 c:/Users/user/ jruby-1.7.4/lib/ruby/shared/rubygems/custom_require.rb:1 (root) at extconf.rb:2

Gem 文件将继续安装在 c:/Users/user/jruby-1.7.4/lib/ruby/gems/share d/gems/pg-0.12.2 以供检查。结果记录到 c:/Users/user/jruby-1.7.4/lib/ruby/gems/shared/gems/pg-0.12.2/ext/gem_make.out 安装 pg (0.12.2) 时出错,并且Bundler 无法继续。gem install pg -v '0.12.2'在捆绑之前确保成功。

请指教。


我尝试按照此处的文档安装 Neo4j:https ://github.com/andreasronge/neo4j/wiki/Neo4j%3A%3ARails-Introduction 我尝试运行 rails new myapp -m http://andreasronge.github.com/neo4j /rails.rb -O 但它给了我以下错误:

Errno::EINVAL: Invalid argument - =C:
            replace at org/jruby/RubyHash.java:1791
  with_original_env at c:/Users/user/jruby-1.7.4/lib/ruby/gems/shared/gems/bundl
er-1.3.5/lib/bundler.rb:207
     with_clean_env at c:/Users/user/jruby-1.7.4/lib/ruby/gems/shared/gems/bundl
er-1.3.5/lib/bundler.rb:211
     bundle_command at c:/Users/user/jruby-1.7.4/lib/ruby/gems/shared/gems/railt
ies-4.0.0/lib/rails/generators/app_base.rb:271
         run_bundle at c:/Users/user/jruby-1.7.4/lib/ruby/gems/shared/gems/railt
ies-4.0.0/lib/rails/generators/app_base.rb:277
         run_bundle at (eval):1
           __send__ at org/jruby/RubyBasicObject.java:1703
                run at c:/Users/user/jruby-1.7.4/lib/ruby/gems/shared/gems/thor-
0.18.1/lib/thor/command.rb:27
     invoke_command at c:/Users/user/jruby-1.7.4/lib/ruby/gems/shared/gems/thor-
0.18.1/lib/thor/invocation.rb:120
         invoke_all at c:/Users/user/jruby-1.7.4/lib/ruby/gems/shared/gems/thor-
0.18.1/lib/thor/invocation.rb:127
               each at org/jruby/RubyHash.java:1332
                map at org/jruby/RubyEnumerable.java:713
         invoke_all at c:/Users/user/jruby-1.7.4/lib/ruby/gems/shared/gems/thor-
0.18.1/lib/thor/invocation.rb:127
           dispatch at c:/Users/user/jruby-1.7.4/lib/ruby/gems/shared/gems/thor-
0.18.1/lib/thor/group.rb:233
              start at c:/Users/user/jruby-1.7.4/lib/ruby/gems/shared/gems/thor-
0.18.1/lib/thor/base.rb:439
             (root) at c:/Users/user/jruby-1.7.4/lib/ruby/gems/shared/gems/railt
ies-4.0.0/lib/rails/commands/application.rb:43
            require at org/jruby/RubyKernel.java:1054
             (root) at c:/Users/user/jruby-1.7.4/lib/ruby/shared/rubygems/custom
_require.rb:1
            require at c:/Users/user/jruby-1.7.4/lib/ruby/shared/rubygems/custom
_require.rb:55
            require at org/jruby/RubyKernel.java:1054
             (root) at c:/Users/user/jruby-1.7.4/lib/ruby/gems/shared/gems/railt
ies-4.0.0/lib/rails/cli.rb:15
             (root) at c:/Users/user/jruby-1.7.4/lib/ruby/shared/rubygems/custom
_require.rb:1
               load at org/jruby/RubyKernel.java:1073
             (root) at c:/Users/user/jruby-1.7.4/bin/rails:23

更重要的是,我之前构建的 Rails 3.2.1 应用程序现在在我运行 rails server 时无法运行。会不会是

gem install rails

命令破坏了我的旧应用程序?

提前致谢!

4

0 回答 0