1

我尝试运行服务器并看到这个......

我不是 ruby​​ 程序员,你能帮我运行这个项目吗?这是网站的旧项目

我有 2 个目录和 2 个 pg 转储。

共享目录名之一,其他目录名一次备份 20130130080242

和 2 pg 备份 psql-banner_system_production-2013-09-26--19-00-02-db.dump.gz 和 psql-iss_production-2013-09-26--19-00-02-db.dump.gz

$ rails server
/home/{user}/555666/20130130080242/vendor/bundle/ruby/1.9.1/gems/pg-0.14.0/lib/pg.rb:4:in `require': libruby.so.1.9: cannot open shared object file: No such file or directory - /home/{user}/555666/20130130080242/vendor/bundle/ruby/1.9.1/gems/pg-0.14.0/lib/pg_ext.so (LoadError)
    from /home/{user}/555666/20130130080242/vendor/bundle/ruby/1.9.1/gems/pg-0.14.0/lib/pg.rb:4:in `<top (required)>'
    from /var/lib/gems/1.9.1/gems/bundler-1.3.5/lib/bundler/runtime.rb:72:in `require'
    from /var/lib/gems/1.9.1/gems/bundler-1.3.5/lib/bundler/runtime.rb:72:in `block (2 levels) in require'
    from /var/lib/gems/1.9.1/gems/bundler-1.3.5/lib/bundler/runtime.rb:70:in `each'
    from /var/lib/gems/1.9.1/gems/bundler-1.3.5/lib/bundler/runtime.rb:70:in `block in require'
    from /var/lib/gems/1.9.1/gems/bundler-1.3.5/lib/bundler/runtime.rb:59:in `each'
    from /var/lib/gems/1.9.1/gems/bundler-1.3.5/lib/bundler/runtime.rb:59:in `require'
    from /var/lib/gems/1.9.1/gems/bundler-1.3.5/lib/bundler.rb:132:in `require'
    from /home/{user}/555666/20130130080242/config/application.rb:7:in `<top (required)>'
    from /home/{user}/555666/20130130080242/vendor/bundle/ruby/1.9.1/gems/railties-3.2.0/lib/rails/commands.rb:53:in `require'
    from /home/{user}/555666/20130130080242/vendor/bundle/ruby/1.9.1/gems/railties-3.2.0/lib/rails/commands.rb:53:in `block in <top (required)>'
    from /home/{user}/555666/20130130080242/vendor/bundle/ruby/1.9.1/gems/railties-3.2.0/lib/rails/commands.rb:50:in `tap'
    from /home/{user}/555666/20130130080242/vendor/bundle/ruby/1.9.1/gems/railties-3.2.0/lib/rails/commands.rb:50:in `<top (required)>'
    from script/rails:6:in `require'
    from script/rails:6:in `<main>'
4

1 回答 1

0

将 postgres 添加到您Gemfile的根 rails 目录

gem 'pg'

之后从项目根命令运行

bundle install

并运行服务器

rails s
于 2013-09-28T08:43:09.053 回答