加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

ruby-on-rails – Active_support / dependencies.rb:247`requi

发布时间:2020-12-17 01:34:13 所属栏目:百科 来源:网络整理
导读:我在 Windows机器上使用 Ruby 2.1.5,Rails 4.1.6和PostgreSQL 9.3.5. 当我尝试捆绑exec rails服务器时,我最终得到以下错误: DL is deprecated,please use Fiddlec:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/activesupport-4.1.6/lib/active_supp
我在 Windows机器上使用 Ruby 2.1.5,Rails 4.1.6和PostgreSQL 9.3.5.

当我尝试捆绑exec rails服务器时,我最终得到以下错误:

DL is deprecated,please use Fiddle
c:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/activesupport-4.1.6/lib/active_support/dependencies.rb:247:in `require': cannot load such file -- 2.1/pg_ext (LoadError)
 from c:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/activesupport-4.1.6/lib/active_support/dependencies.rb:247:in `block in re...re'
 from c:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/activesupport-4.1.6/lib/active_support/dependencies.rb:232:in `load_dependancy'
 from c:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/activesupport-4.1.6/lib/active_support/dependencies.rb:247:in `require'
 from c:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/pg-0.17.1-x86-mingw32/lib/pg.rb:10:in `rescue in <top (required)>'
 from c:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/pg-0.17.1-x86-mingw32/lib/pg.rb:3:in `<top (required)>'
 from c:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/bundler-1.7.7/lib/bundler/runtime.rb:76:in `require'
 from c:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/bundler-1.7.7/lib/bundler/runtime.rb:76:in `block (2 levels) in require'
 from c:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/bundler-1.7.7/lib/bundler/runtime.rb:72:in `each'
 from c:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/bundler-1.7.7/lib/bundler/runtime.rb:72:in `block in require'
 from c:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/bundler-1.7.7/lib/bundler/runtime.rb:61:in `each'
 from c:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/bundler-1.7.7/lib/bundler/runtime.rb:61:in `require'
 from c:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/bundler-1.7.7/lib/bundler.rb:133:in `require'
 from C:/....../config/application.rb:5:in `<top (required)>'
 from c:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/railties-4.1.6/lib/rails/commands/commands_tasks.rb:79:in `require'
 from c:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/railties-4.1.6/lib/rails/commands/commands_tasks.rb:79:in `block in server
 from c:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/railties-4.1.6/lib/rails/commands/commands_tasks.rb:76:in `tap'
 from c:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/railties-4.1.6/lib/rails/commands/commands_tasks.rb:76:in `server'
 from c:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/railties-4.1.6/lib/rails/commands/commands_tasks.rb:40:in `run_command!'
 from c:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/railties-4.1.6/lib/rails/commands.rb:17:in `<top (required)>'
 from bin/rails:8:in `require'
 from bin/rails:8:in `<main>'

解决方法

我需要使用更新版本的pg gem:

宝石’pg’,’?> 0.18.0.pre20141117110243′

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读