hello list, yesterday i installed a fresh rails installation with a proper upgrade of gem to version 1.0.1 i saw, there is still a gem package to support postgresql known as postgres-0.7.9.2008.01.09 on rubyforge, its the newest one of stable postgres support for ruby additionally i installed, of course, a the postgres database on my machine to C:\Programme\PostgreSQL\8.2 after setting up a new rails project and editing the database.yml i execute the command rake db:create:all to create all databases on the fly :-) and the prompt shows me: D:\rails\tree>rake db:create:all --trace (in D:/rails/tree) ** Invoke db:create:all (first_time) ** Invoke environment (first_time) ** Execute environment ** Execute db:create:all rake aborted! no such file to load -- postgres c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require' c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `require' c:/ruby/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/active_support/ dependencies.rb:496:in `require' c:/ruby/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/active_support/ dependencies.rb:342:in `new_constants_in' c:/ruby/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/active_support/ dependencies.rb:496:in `require' c:/ruby/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/active_support/ core_ext/kernel/requires.rb:7:in `require_library_or_gem' c:/ruby/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/active_support/ core_ext/kernel/reporting.rb:11:in `silence_warnings' c:/ruby/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/active_support/ core_ext/kernel/requires.rb:5:in `require_library_or_gem' c:/ruby/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_record/ connection_adapters/postgresql_adapter.rb:7:in `postgresql_connection' c:/ruby/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_record/ connection_adapters/abstract/connection_specification.rb:291:in `send' c:/ruby/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_record/ connection_adapters/abstract/connection_specification.rb:291:in `connection=' c:/ruby/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_record/ connection_adapters/abstract/connection_specification.rb:259:in `retrieve_connection' c:/ruby/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_record/ connection_adapters/abstract/connection_specification.rb:78:in `connection' c:/ruby/lib/ruby/gems/1.8/gems/rails-2.0.2/lib/tasks/databases.rake: 36:in `create_database' c:/ruby/lib/ruby/gems/1.8/gems/rails-2.0.2/lib/tasks/databases.rake:20 c:/ruby/lib/ruby/gems/1.8/gems/rails-2.0.2/lib/tasks/databases.rake: 5:in `each_value' c:/ruby/lib/ruby/gems/1.8/gems/rails-2.0.2/lib/tasks/databases.rake:5 c:/ruby/lib/ruby/gems/1.8/gems/rake-0.7.2/lib/rake.rb:399:in `call' c:/ruby/lib/ruby/gems/1.8/gems/rake-0.7.2/lib/rake.rb:399:in `execute' c:/ruby/lib/ruby/gems/1.8/gems/rake-0.7.2/lib/rake.rb:399:in `each' c:/ruby/lib/ruby/gems/1.8/gems/rake-0.7.2/lib/rake.rb:399:in `execute' c:/ruby/lib/ruby/gems/1.8/gems/rake-0.7.2/lib/rake.rb:369:in `invoke' c:/ruby/lib/ruby/gems/1.8/gems/rake-0.7.2/lib/rake.rb:362:in `synchronize' c:/ruby/lib/ruby/gems/1.8/gems/rake-0.7.2/lib/rake.rb:362:in `invoke' c:/ruby/lib/ruby/gems/1.8/gems/rake-0.7.2/lib/rake.rb:1935:in `run' c:/ruby/lib/ruby/gems/1.8/gems/rake-0.7.2/lib/rake.rb:1935:in `each' c:/ruby/lib/ruby/gems/1.8/gems/rake-0.7.2/lib/rake.rb:1935:in `run' c:/ruby/lib/ruby/gems/1.8/gems/rake-0.7.2/bin/rake:7 c:/ruby/bin/rake.bat:20:in `load' c:/ruby/bin/rake.bat:20 ive got no idea whats wrong? many thanks for help best regards
on 15.01.2008 21:36
on 15.01.2008 22:48
On 1/15/08, inriz <matthias.zirnstein@gmx.de> wrote: > rake aborted! > no such file to load -- postgres adapter: postgresql It's postgresql, not postgres. -- Greg Donald http://destiney.com/
on 15.01.2008 22:55
the database.yml is okay i set the adapter to postgresql for each database im working under win xp, can it be that postgres doesnt work under xp well? i read about it and installed postgres-pr but the rake task to create the databases also doesnt work for me.
on 15.01.2008 23:02
On 1/15/08, inriz <matthias.zirnstein@gmx.de> wrote: > > the database.yml is okay > i set the adapter to postgresql for each database > > im working under win xp, can it be that postgres > doesnt work under xp well? No idea, haven't ever tried Rails on windoze. > i read about it and installed postgres-pr > but the rake task to create the databases also > doesnt work for me. What errors are you getting now? Same? Did you get any errors when you installed the gem? Can you actually locate the gem directory on your system? What happens when you try to load it manually, outside of Rails? irb -r postgres -- Greg Donald http://destiney.com/
on 21.01.2008 14:25
Hi list, I have pretty much the same problem on Mac OS X 10.5, Rails 2.0.2 and Postgres 8.2.4. In database.yml I have adapter: postgresql The gems I have installed are: $ gem list *** LOCAL GEMS *** actionmailer (2.0.2, 1.3.6) actionpack (2.0.2, 1.13.6) actionwebservice (1.2.6) activerecord (2.0.2, 1.15.6) activeresource (2.0.2) activesupport (2.0.2, 1.4.4) libxml-ruby (0.3.8.4) postgres (0.7.9.2008.01.09, 0.7.9.2007.12.22) postgres-pr (0.4.0) rails (2.0.2, 1.2.6) rake (0.8.1) rubygems-update (1.0.1) rubyosa (0.4.0) sources (0.0.1) trying $ irb -r postgres I get /usr/local/lib/ruby/1.8/irb/init.rb:252:in `require': no such file to load -- postgres (LoadError) from /usr/local/lib/ruby/1.8/irb/init.rb:252:in `load_modules' from /usr/local/lib/ruby/1.8/irb/init.rb:250:in `each' from /usr/local/lib/ruby/1.8/irb/init.rb:250:in `load_modules' from /usr/local/lib/ruby/1.8/irb/init.rb:21:in `setup' from /usr/local/lib/ruby/1.8/irb.rb:54:in `start' from /usr/local/bin/irb:13 Any ideas?
on 21.01.2008 20:05
Looks like this problem is due to outdated files. There is a rake task to update a project: rake rails:update # Update both configs, scripts and public/javascripts from Rails Running this sorts out the problem.