Hi there, I'm trying to get up and running with PostgreSQL 8.4 and the Rails 3 beta. I'm running on Ruby 1.8.7 via RVM and have installed the 'pg' gem. While I've been able to get the pg gem to successfully build, whenever I create a new rails app, tell it to use Postgres, and execute 'rails server' I get the following error: jury$ rails server /Users/jury/.rvm/gems/ruby-1.8.7-p249/gems/pg-0.8.0/lib/pg.bundle: dlsym(0x1026ef640, Init_pg): symbol not found - /Users/jury/.rvm/gems/ruby-1.8.7-p249/gems/pg-0.8.0/lib/pg.bundle (LoadError) from /Users/jury/.rvm/gems/ruby-1.8.7-p249/gems/bundler-0.9.3/lib/bundler/runtime.rb:26:in `require' from /Users/jury/.rvm/gems/ruby-1.8.7-p249/gems/bundler-0.9.3/lib/bundler/runtime.rb:25:in `each' from /Users/jury/.rvm/gems/ruby-1.8.7-p249/gems/bundler-0.9.3/lib/bundler/runtime.rb:25:in `require' from /Users/jury/.rvm/gems/ruby-1.8.7-p249/gems/bundler-0.9.3/lib/bundler/runtime.rb:24:in `each' from /Users/jury/.rvm/gems/ruby-1.8.7-p249/gems/bundler-0.9.3/lib/bundler/runtime.rb:24:in `require' from /Users/jury/.rvm/gems/ruby-1.8.7-p249/gems/bundler-0.9.3/lib/bundler.rb:70:in `require' from /Volumes/Khronos/jury/Documents/rails3/postApp/config/application.rb:6 from /Users/jury/.rvm/gems/ruby-1.8.7-p249/gems/railties-3.0.0.beta/lib/rails/commands.rb:36:in `require' from /Users/jury/.rvm/gems/ruby-1.8.7-p249/gems/railties-3.0.0.beta/lib/rails/commands.rb:36 from /Volumes/Khronos/jury/Documents/rails3/postApp/script/rails:10:in `require' from /Volumes/Khronos/jury/Documents/rails3/postApp/script/rails:10 I'm guessing this is either an error in bundler or ruby-pg, but would appreciate any pointers if anyone has run into this before and worked around it. For that matter, has anyone out there successfully got the Rails 3 beta and Postgres working well together? If so, I'd love to know what you've done. Thanks in advance! -J
on 2010-02-08 08:50
on 2010-02-08 15:23
I just try and all are working good under Ruby 1.8.7 MRI... (I did'nt try RVM...) I did'nt any special thing, I just install pg gem and run: rails xxx -d postgresql cd xxx I have modify config/database.yml adding => host: localhost and setting user / password rails generate scaffold user name:string published:boolean rake db:create rake db:migrate rails server => http://localhost:3000/users CRUD operations are all working good Hope this helps...
on 2010-02-08 15:26
Wait a moment... Do you have removed the old versions of bundler gem ? (I think that is very important to have only the last version installed !!!)
on 2010-02-09 01:44
So looks like this is an issue with the PostgreSQL install that I happened to snag. I just finished blowing everything away and reinstalling it all from MacPorts and it's working like a charm. Huge thanks for your hep, Gianluca! -J Gianluca Tessarolo wrote: > I just try and all are working good under Ruby 1.8.7 MRI... (I did'nt > try RVM...) > > I did'nt any special thing, I just install pg gem and run: > > rails xxx -d postgresql > cd xxx > I have modify config/database.yml adding => host: localhost and setting > user / password > rails generate scaffold user name:string published:boolean > rake db:create > rake db:migrate > rails server > > => http://localhost:3000/users > > CRUD operations are all working good > > Hope this helps...
Please log in before posting. Registration is free and takes only a minute.
Existing account
(Switch to SSL-encrypted connection)
NEW: Do you have a Google/GoogleMail or Yahoo account? No registration required!
Log in with Google account | Log in with Yahoo account
Log in with Google account | Log in with Yahoo account
No account? Register here.