osx - rails generate not working in postgres app -
i'm sorry, i'm having difficult time everywhere turn seems. works fine in app using sqlite, when have app created
rails new devtest --database=postgresql things don't seem working in project. using postgres.app
$ cd devtest/ johns-mbp:devtest johncurry$ rails generate controller welcome /users/johncurry/.rvm/gems/ruby-2.0.0-p247/gems/pg-0.17.1/lib/pg.rb:4:in `require': dlopen(/users/johncurry/.rvm/gems/ruby-2.0.0-p247/gems/pg-0.17.1/lib/pg_ext.bundle, 9): library not loaded: /usr/local/lib/libpq.5.6.dylib (loaderror) referenced from: /users/johncurry/.rvm/gems/ruby-2.0.0-p247/gems/pg-0.17.1/lib/pg_ext.bundle reason: image not found - /users/johncurry/.rvm/gems/ruby-2.0.0-p247/gems/pg-0.17.1/lib/pg_ext.bundle /users/johncurry/.rvm/gems/ruby-2.0.0-p247/gems/pg-0.17.1/lib/pg.rb:4:in `<top (required)>' /users/johncurry/.rvm/gems/ruby-2.0.0-p247/gems/bundler-1.3.5/lib/bundler/runtime.rb:72:in `require' /users/johncurry/.rvm/gems/ruby-2.0.0-p247/gems/bundler-1.3.5/lib/bundler/runtime.rb:72:in `block (2 levels) in require' /users/johncurry/.rvm/gems/ruby-2.0.0-p247/gems/bundler-1.3.5/lib/bundler/runtime.rb:70:in `each' /users/johncurry/.rvm/gems/ruby-2.0.0-p247/gems/bundler-1.3.5/lib/bundler/runtime.rb:70:in `block in require' /users/johncurry/.rvm/gems/ruby-2.0.0-p247/gems/bundler-1.3.5/lib/bundler/runtime.rb:59:in `each' /users/johncurry/.rvm/gems/ruby-2.0.0-p247/gems/bundler-1.3.5/lib/bundler/runtime.rb:59:in `require' /users/johncurry/.rvm/gems/ruby-2.0.0-p247/gems/bundler-1.3.5/lib/bundler.rb:132:in `require' /users/johncurry/desktop/devtest/config/application.rb:7:in `<top (required)>' /users/johncurry/.rvm/gems/ruby-2.0.0-p247/gems/railties-4.0.2/lib/rails/commands.rb:43:in `require' /users/johncurry/.rvm/gems/ruby-2.0.0-p247/gems/railties-4.0.2/lib/rails/commands.rb:43:in `<top (required)>' bin/rails:4:in `require' bin/rails:4:in `<main>'
the reason postgres libraries not installed.
try
sudo apt-get install libpq-dev gem install pg
Comments
Post a Comment