Ok, Completely new to Rails here and have just started running through some tutorials using Netbeans 6 Postgres 8.3 beta Windows Vista I''m looking at migration and trying to get my head round that, but each time I run a migration I get this error rake aborted! no such file to load -- postgres (See full trace by running task with --trace) I''ve looked at the trace and cant see anything of use in there but I''ve stuck it at the bottom of the post anyway. So does anyone know what the problem could be? Cheers Tony ** Invoke db:migrate (first_time) ** Invoke environment (first_time) ** Execute environment ** Execute db:migrate rake aborted! no such file to load -- postgres C:/Program Files (x86)/NetBeans 6.0/ruby1/jruby-1.0.2/lib/ruby/gems/1.8/gems/activesupport-1.4.4/lib/active_support/core_ext/kernel/requires.rb:19:in `require_library_or_gem'' C:/Program Files (x86)/NetBeans 6.0/ruby1/jruby-1.0.2/lib/ruby/gems/1.8/gems/activerecord-1.15.5/lib/active_record/connection_adapters/postgresql_adapter.rb:7:in `silence_warnings'' C:/Program Files (x86)/NetBeans 6.0/ruby1/jruby-1.0.2/lib/ruby/gems/1.8/gems/activesupport-1.4.4/lib/active_support/core_ext/kernel/requires.rb:5:in `require_library_or_gem'' C:/Program Files (x86)/NetBeans 6.0/ruby1/jruby-1.0.2/lib/ruby/gems/1.8/gems/activerecord-1.15.5/lib/active_record/connection_adapters/postgresql_adapter.rb:7:in `postgresql_connection'' C:/Program Files (x86)/NetBeans 6.0/ruby1/jruby-1.0.2/lib/ruby/gems/1.8/gems/activerecord-1.15.5/lib/active_record/connection_adapters/abstract/connection_specification.rb:262:in `send'' C:/Program Files (x86)/NetBeans 6.0/ruby1/jruby-1.0.2/lib/ruby/gems/1.8/gems/activerecord-1.15.5/lib/active_record/connection_adapters/abstract/connection_specification.rb:262:in `connection='' C:/Program Files (x86)/NetBeans 6.0/ruby1/jruby-1.0.2/lib/ruby/gems/1.8/gems/activerecord-1.15.5/lib/active_record/query_cache.rb:54:in `connection='' C:/Program Files (x86)/NetBeans 6.0/ruby1/jruby-1.0.2/lib/ruby/gems/1.8/gems/activerecord-1.15.5/lib/active_record/connection_adapters/abstract/connection_specification.rb:230:in `retrieve_connection'' C:/Program Files (x86)/NetBeans 6.0/ruby1/jruby-1.0.2/lib/ruby/gems/1.8/gems/activerecord-1.15.5/lib/active_record/connection_adapters/abstract/connection_specification.rb:78:in `connection'' C:/Program Files (x86)/NetBeans 6.0/ruby1/jruby-1.0.2/lib/ruby/gems/1.8/gems/activerecord-1.15.5/lib/active_record/migration.rb:284:in `migrate'' C:/Program Files (x86)/NetBeans 6.0/ruby1/jruby-1.0.2/lib/ruby/gems/1.8/gems/rails-1.2.5/lib/tasks/databases.rake:4 C:/Program Files (x86)/NetBeans 6.0/ruby1/jruby-1.0.2/lib/ruby/gems/1.8/gems/rails-1.2.5/lib/tasks/rails.rb:4:in `call'' C:/Program Files (x86)/NetBeans 6.0/ruby1/jruby-1.0.2/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:392:in `execute'' C:/Program Files (x86)/NetBeans 6.0/ruby1/jruby-1.0.2/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:362:in `each'' C:/Program Files (x86)/NetBeans 6.0/ruby1/jruby-1.0.2/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:392:in `execute'' C:/Program Files (x86)/NetBeans 6.0/ruby1/jruby-1.0.2/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:362:in `invoke'' C:/Program Files (x86)/NetBeans 6.0/ruby1/jruby-1.0.2/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:1739:in `synchronize'' C:/Program Files (x86)/NetBeans 6.0/ruby1/jruby-1.0.2/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:355:in `invoke'' C:/Program Files (x86)/NetBeans 6.0/ruby1/jruby-1.0.2/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:1739:in `top_level'' C:/Program Files (x86)/NetBeans 6.0/ruby1/jruby-1.0.2/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:1711:in `each'' C:/Program Files (x86)/NetBeans 6.0/ruby1/jruby-1.0.2/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:1739:in `top_level'' C:/Program Files (x86)/NetBeans 6.0/ruby1/jruby-1.0.2/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:1711:in `standard_exception_handling'' C:/Program Files (x86)/NetBeans 6.0/ruby1/jruby-1.0.2/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:1733:in `top_level'' C:/Program Files (x86)/NetBeans 6.0/ruby1/jruby-1.0.2/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:1711:in `run'' C:/Program Files (x86)/NetBeans 6.0/ruby1/jruby-1.0.2/lib/ruby/gems/1.8/gems/rake-0.7.3/bin/rake:7:in `standard_exception_handling'' C:/Program Files (x86)/NetBeans 6.0/ruby1/jruby-1.0.2/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:1708:in `run'' C:/Program Files (x86)/NetBeans 6.0/ruby1/jruby-1.0.2/lib/ruby/gems/1.8/gems/rake-0.7.3/bin/rake:7 :1:in `load'' :1 -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
You need to install the postgres and/or ruby-postgres gems. I''m not sure if both are needed as I''ve had it installed for a while now and can''t remember. Beyond that, I believe the adapter name in the database.yml file should be postgresql not just postgres. Peace, Phillip On Dec 6, 2007, at 9:13 AM, Mathew Mcloughlin wrote:> > Ok, > > Completely new to Rails here and have just started running through > some > tutorials using > > Netbeans 6 > Postgres 8.3 beta > Windows Vista > > I''m looking at migration and trying to get my head round that, but > each > time I run a migration I get this error > > rake aborted! > no such file to load -- postgres > > (See full trace by running task with --trace) > > I''ve looked at the trace and cant see anything of use in there but > I''ve > stuck it at the bottom of the post anyway. > > So does anyone know what the problem could be? > > Cheers > Tony > > ** Invoke db:migrate (first_time) > ** Invoke environment (first_time) > ** Execute environment > ** Execute db:migrate > rake aborted! > no such file to load -- postgres > C:/Program Files (x86)/NetBeans > 6.0/ruby1/jruby-1.0.2/lib/ruby/gems/1.8/gems/activesupport-1.4.4/ > lib/active_support/core_ext/kernel/requires.rb:19:in > `require_library_or_gem'' > C:/Program Files (x86)/NetBeans > 6.0/ruby1/jruby-1.0.2/lib/ruby/gems/1.8/gems/activerecord-1.15.5/ > lib/active_record/connection_adapters/postgresql_adapter.rb:7:in > `silence_warnings'' > C:/Program Files (x86)/NetBeans > 6.0/ruby1/jruby-1.0.2/lib/ruby/gems/1.8/gems/activesupport-1.4.4/ > lib/active_support/core_ext/kernel/requires.rb:5:in > `require_library_or_gem'' > C:/Program Files (x86)/NetBeans > 6.0/ruby1/jruby-1.0.2/lib/ruby/gems/1.8/gems/activerecord-1.15.5/ > lib/active_record/connection_adapters/postgresql_adapter.rb:7:in > `postgresql_connection'' > C:/Program Files (x86)/NetBeans > 6.0/ruby1/jruby-1.0.2/lib/ruby/gems/1.8/gems/activerecord-1.15.5/ > lib/active_record/connection_adapters/abstract/ > connection_specification.rb:262:in > `send'' > C:/Program Files (x86)/NetBeans > 6.0/ruby1/jruby-1.0.2/lib/ruby/gems/1.8/gems/activerecord-1.15.5/ > lib/active_record/connection_adapters/abstract/ > connection_specification.rb:262:in > `connection='' > C:/Program Files (x86)/NetBeans > 6.0/ruby1/jruby-1.0.2/lib/ruby/gems/1.8/gems/activerecord-1.15.5/ > lib/active_record/query_cache.rb:54:in > `connection='' > C:/Program Files (x86)/NetBeans > 6.0/ruby1/jruby-1.0.2/lib/ruby/gems/1.8/gems/activerecord-1.15.5/ > lib/active_record/connection_adapters/abstract/ > connection_specification.rb:230:in > `retrieve_connection'' > C:/Program Files (x86)/NetBeans > 6.0/ruby1/jruby-1.0.2/lib/ruby/gems/1.8/gems/activerecord-1.15.5/ > lib/active_record/connection_adapters/abstract/ > connection_specification.rb:78:in > `connection'' > C:/Program Files (x86)/NetBeans > 6.0/ruby1/jruby-1.0.2/lib/ruby/gems/1.8/gems/activerecord-1.15.5/ > lib/active_record/migration.rb:284:in > `migrate'' > C:/Program Files (x86)/NetBeans > 6.0/ruby1/jruby-1.0.2/lib/ruby/gems/1.8/gems/rails-1.2.5/lib/tasks/ > databases.rake:4 > C:/Program Files (x86)/NetBeans > 6.0/ruby1/jruby-1.0.2/lib/ruby/gems/1.8/gems/rails-1.2.5/lib/tasks/ > rails.rb:4:in > `call'' > C:/Program Files (x86)/NetBeans > 6.0/ruby1/jruby-1.0.2/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb: > 392:in > `execute'' > C:/Program Files (x86)/NetBeans > 6.0/ruby1/jruby-1.0.2/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb: > 362:in > `each'' > C:/Program Files (x86)/NetBeans > 6.0/ruby1/jruby-1.0.2/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb: > 392:in > `execute'' > C:/Program Files (x86)/NetBeans > 6.0/ruby1/jruby-1.0.2/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb: > 362:in > `invoke'' > C:/Program Files (x86)/NetBeans > 6.0/ruby1/jruby-1.0.2/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb: > 1739:in > `synchronize'' > C:/Program Files (x86)/NetBeans > 6.0/ruby1/jruby-1.0.2/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb: > 355:in > `invoke'' > C:/Program Files (x86)/NetBeans > 6.0/ruby1/jruby-1.0.2/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb: > 1739:in > `top_level'' > C:/Program Files (x86)/NetBeans > 6.0/ruby1/jruby-1.0.2/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb: > 1711:in > `each'' > C:/Program Files (x86)/NetBeans > 6.0/ruby1/jruby-1.0.2/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb: > 1739:in > `top_level'' > C:/Program Files (x86)/NetBeans > 6.0/ruby1/jruby-1.0.2/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb: > 1711:in > `standard_exception_handling'' > C:/Program Files (x86)/NetBeans > 6.0/ruby1/jruby-1.0.2/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb: > 1733:in > `top_level'' > C:/Program Files (x86)/NetBeans > 6.0/ruby1/jruby-1.0.2/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb: > 1711:in > `run'' > C:/Program Files (x86)/NetBeans > 6.0/ruby1/jruby-1.0.2/lib/ruby/gems/1.8/gems/rake-0.7.3/bin/rake:7:in > `standard_exception_handling'' > C:/Program Files (x86)/NetBeans > 6.0/ruby1/jruby-1.0.2/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb: > 1708:in > `run'' > C:/Program Files (x86)/NetBeans > 6.0/ruby1/jruby-1.0.2/lib/ruby/gems/1.8/gems/rake-0.7.3/bin/rake:7 > :1:in `load'' > :1 > -- > Posted via http://www.ruby-forum.com/. > > >--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Cheers Mate, So I''m now trying to install the gem and this is what I get Building native extensions. This could take a while... Error opening script file: extconf.rb (The system cannot find the file specified) ERROR: While executing gem ... (Gem::Installer::ExtensionBuildError) ERROR: Failed to build gem native extension. ruby extconf.rb install postgres --no-rdoc --no-ri --include-dependencies --version > 0 Gem files will remain installed in C:/Program Files (x86)/NetBeans 6.0/ruby1/jruby-1.0.2/lib/ruby/gems/1.8/gems/postgres-0.7.1 for inspection. Results logged to C:/Program Files (x86)/NetBeans 6.0/ruby1/jruby-1.0.2/lib/ruby/gems/1.8/gems/postgres-0.7.1/gem_make.out Any Ideas anyone? -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
It looks like you''re missing some development libraries, but I''m not sure which one(s). I''ve never tried to get rails working on a Windows box, so I really can''t be of much more help. On *nix, I''d probably make sure I have ruby-dev installed for the version of ruby I''m using. You could look around and see if there is a ruby development installation for Windows. Peace, Phillip On Dec 7, 2007, at 9:43 AM, Mathew Mcloughlin wrote:> > Cheers Mate, > > So I''m now trying to install the gem and this is what I get > > Building native extensions. This could take a while... > Error opening script file: extconf.rb (The system cannot find the file > specified) > ERROR: While executing gem ... (Gem::Installer::ExtensionBuildError) > ERROR: Failed to build gem native extension. > > ruby extconf.rb install postgres --no-rdoc --no-ri > --include-dependencies --version > 0 > > > Gem files will remain installed in C:/Program Files (x86)/NetBeans > 6.0/ruby1/jruby-1.0.2/lib/ruby/gems/1.8/gems/postgres-0.7.1 for > inspection. > Results logged to C:/Program Files (x86)/NetBeans > 6.0/ruby1/jruby-1.0.2/lib/ruby/gems/1.8/gems/postgres-0.7.1/ > gem_make.out > > > Any Ideas anyone? > -- > Posted via http://www.ruby-forum.com/. > > >--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Its all sorted now....I installed postgres-pr and its worked a treat thanks for your help phillip -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Mathew Mcloughlin wrote:> Its all sorted now....I installed postgres-pr > > and its worked a treat > > thanks for your help phillipPlz load ''rubygems'' before ''postgres''. For example require ''rubygems'' require ''postgres'' ...rest of the code... May solve ur problem. -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Mathew Mcloughlin wrote:> Ok, > > Completely new to Rails here and have just started running through some > tutorials using > > Netbeans 6 > Postgres 8.3 beta > Windows VistaGlad you got it working. Just as a side issue, I''d suggest dropping NetBeans and Windows. Rails development is actually better without an IDE IMHO -- try a good editor such as KomodoEdit instead -- and certainly as you''re just learning the framework, you should not have NetBeans getting in your way. And you''ll probably have fewer problems if you''re running some sort of *nix (including Mac OS or a VM -- VirtualRails seems to be causing something of a splash). Best, -- Marnen Laibow-Koser http://www.marnen.org marnen-sbuyVjPbboAdnm+yROfE0A@public.gmane.org -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.