This project is archived and is in readonly mode.
Rails3 postgresql support broken
-
Nikolay Petrachkov
tried rails 3 with postgres. It works on ruby ee 1.8.7 2009.10. You have to bundle pg gem. Just add gem "pg" to file Gemfile and then bundle install.
On ruby 1.9.1 it gives me an error when i'm trying to start server:jx@jxkubuntu812:~/projects/topscore$ ./script/rails server => Booting WEBrick => Rails 3.0.0.beta application starting in development on http://0.0.0.0:3000 => Call with -d to detach => Ctrl-C to shutdown server Exiting /home/jx/projects/topscore/.bundle/environment.rb:143:in `block in patch_rubygems': undefined method `name=' for #<Gem::LoadError:0x989d00c> (NoMethodError) from /home/jx/.bundle/ruby/1.8/gems/activerecord-3.0.0.beta/lib/active_record/connection_adapters/abstract/connection_specification.rb:70:in `establish_connection' from /home/jx/.bundle/ruby/1.8/gems/activerecord-3.0.0.beta/lib/active_record/connection_adapters/abstract/connection_specification.rb:60:in `establish_connection' from /home/jx/.bundle/ruby/1.8/gems/activerecord-3.0.0.beta/lib/active_record/connection_adapters/abstract/connection_specification.rb:55:in `establish_connection' from /home/jx/.bundle/ruby/1.8/gems/activerecord-3.0.0.beta/lib/active_record/railtie.rb:45:in `block in <class:Railtie>' from /home/jx/.bundle/ruby/1.8/gems/railties-3.0.0.beta/lib/rails/initializable.rb:25:in `instance_exec' from /home/jx/.bundle/ruby/1.8/gems/railties-3.0.0.beta/lib/rails/initializable.rb:25:in `run' from /home/jx/.bundle/ruby/1.8/gems/railties-3.0.0.beta/lib/rails/initializable.rb:55:in `block in run_initializers' from /home/jx/.bundle/ruby/1.8/gems/railties-3.0.0.beta/lib/rails/initializable.rb:54:in `each' from /home/jx/.bundle/ruby/1.8/gems/railties-3.0.0.beta/lib/rails/initializable.rb:54:in `run_initializers' from /home/jx/.bundle/ruby/1.8/gems/railties-3.0.0.beta/lib/rails/application.rb:71:in `initialize!' from /home/jx/.bundle/ruby/1.8/gems/railties-3.0.0.beta/lib/rails/application.rb:41:in `method_missing' from /home/jx/projects/topscore/config/environment.rb:5:in `<top (required)>' from /home/jx/.bundle/ruby/1.8/gems/activesupport-3.0.0.beta/lib/active_support/dependencies.rb:167:in `require' from /home/jx/.bundle/ruby/1.8/gems/activesupport-3.0.0.beta/lib/active_support/dependencies.rb:167:in `block in require' from /home/jx/.bundle/ruby/1.8/gems/activesupport-3.0.0.beta/lib/active_support/dependencies.rb:537:in `new_constants_in' from /home/jx/.bundle/ruby/1.8/gems/activesupport-3.0.0.beta/lib/active_support/dependencies.rb:167:in `require' from config.ru:3:in `block in <main>' from /home/jx/.rvm/gems/ree/1.8.7/gems/rack-1.1.0/lib/rack/builder.rb:46:in `instance_eval' from /home/jx/.rvm/gems/ree/1.8.7/gems/rack-1.1.0/lib/rack/builder.rb:46:in `initialize' from config.ru:1:in `new' from config.ru:1:in `<main>' from /home/jx/.rvm/gems/ree/1.8.7/gems/rack-1.1.0/lib/rack/builder.rb:35:in `eval' from /home/jx/.rvm/gems/ree/1.8.7/gems/rack-1.1.0/lib/rack/builder.rb:35:in `parse_file' from /home/jx/.rvm/gems/ree/1.8.7/gems/rack-1.1.0/lib/rack/server.rb:113:in `app' from /home/jx/.rvm/gems/ree/1.8.7/gems/rack-1.1.0/lib/rack/server.rb:189:in `wrapped_app' from /home/jx/.rvm/gems/ree/1.8.7/gems/rack-1.1.0/lib/rack/server.rb:155:in `start' from /home/jx/.bundle/ruby/1.8/gems/railties-3.0.0.beta/lib/rails/commands/server.rb:49:in `start' from /home/jx/.rvm/gems/ree/1.8.7/gems/rack-1.1.0/lib/rack/server.rb:83:in `start' from /home/jx/.bundle/ruby/1.8/gems/railties-3.0.0.beta/lib/rails/commands.rb:39:in `<top (required)>' from ./script/rails:10:in `require' from ./script/rails:10:in `<main>' jx@jxkubuntu812:~/projects/topscore$ ruby -v ruby 1.9.1p243 (2009-07-16 revision 24175) [i686-linux] jx@jxkubuntu812:~/projects/topscore$ bundle show Gems included by the bundle:- abstract (1.0.0)
- actionmailer (3.0.0.beta)
- actionpack (3.0.0.beta)
- activemodel (3.0.0.beta)
- activerecord (3.0.0.beta)
- activeresource (3.0.0.beta)
- activesupport (3.0.0.beta)
- arel (0.2.1)
- builder (2.1.2)
- bundler (0.9.5)
- erubis (2.6.5)
- i18n (0.3.3)
- mail (2.1.2)
- memcache-client (1.7.8)
- mime-types (1.16)
- pg (0.8.0)
- rack (1.1.0)
- rack-mount (0.4.7)
- rack-test (0.5.3)
- rails (3.0.0.beta)
- railties (3.0.0.beta)
- rake (0.8.7)
- sqlite3-ruby (1.2.5)
- text-format (1.0.0)
- text-hyphen (1.0.0)
- thor (0.13.1)
- tzinfo (0.3.16)
-
Nikolay Petrachkov
btw, commenting gem rails and uncommenting gem rails git helps too:
#gem "rails", "3.0.0.beta" ## Bundle edge rails: gem "rails", :git => "git://github.com/rails/rails.git"works on ruby 1.9.1