Ok, this might be stupid, but it''s got me completely stumped. I''ve recently migrated from fedora to ubuntu, and I''m trying to get rails running n my local system (I do development and testing locally, then I push changes to the production server). I''m having trouble installing rails, though, and I think it might be a dependency issue, as Ubuntu breaks ruby up into a metric ton of different packages and I can''t figure out which I need. So far I installed enough of them that I was able to successfully do a "gem install rails" and have it install all the gems successfully. But, when I go to run webrick, rails isn''t very happy: $ ruby script/server /usr/lib/ruby/gems/1.8/gems/actionpack-1.8.1/lib/action_controller.rb:52: undefined method `template_class='' for ActionController::Base:Class (NoMethodError) from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:18:in `require__'' from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:18:in `require'' from /usr/lib/ruby/gems/1.8/gems/activesupport-1.0.4/lib/active_support/dependencies.rb:197:in `require'' from /usr/local/lib/site_ruby/1.8/rubygems.rb:175:in `activate'' from /usr/local/lib/site_ruby/1.8/rubygems.rb:37:in `require_gem_with_options'' from /usr/local/lib/site_ruby/1.8/rubygems.rb:31:in `require_gem'' from ./script/../config/environment.rb:33 from script/server:42:in `require'' from script/server:42 Can any expert look at this and say "oh yes, you''re missing the ''such and such'' package"? All the other errors I''ve had so far very explicitely said that I was missing zlib-ruby or rdoc or whatnot, but I can''t make any sense of this. I''m not sure if I''m missing some dependency or what. Also, the rails project I''m trying to do this in was written in rails 0.11.1, but of course the gems I just installed were for rails 0.12.1. Could that be the cause? I tried updating my rails project with "rails ." in the top level of the project, but got the same output as above. Not sure what''s going on, any help is appreciated. Thanks. -- Urban Artography http://artography.ath.cx
Rob Park wrote:> Ok, this might be stupid, but it''s got me completely stumped. > > I''ve recently migrated from fedora to ubuntu, and I''m trying to get > rails running n my local system (I do development and testing locally, > then I push changes to the production server). > > I''m having trouble installing rails, though, and I think it might be a > dependency issue, as Ubuntu breaks ruby up into a metric ton of > different packages and I can''t figure out which I need. So far I > installed enough of them that I was able to successfully do a "gem > install rails" and have it install all the gems successfully.I''m using rails with Kubuntu 5.05 and have kept track of the pakages and gems I''ve installed over and above the defaults. Here''s the list (the script has *not* yet been verified, but you get the idea). Of the non-ruby packages gcc is required to build native extensions, some of the others are optional e.g. docbook, mysql, ssh, aspell: apt-get --quiet install \ docbook-xsl \ xsltproc \ mysql-server-4.1 \ mysql-doc-4.1 \ gcc manpages-dev autoconf automake libtool \ libmagick6-dev \ mozilla-browser \ libssl-dev zlib1g-dev libbz2-dev libpcre3-dev \ ssh \ libxml2-utils \ aspell-bin aspell \ 2>&1 | tee apt-get.log # Install Ruby and libs. apt-get --quiet install \ irb1.8 \ libbigdecimal-ruby1.8 \ libcurses-ruby1.8 \ libdbm-ruby1.8 \ libdl-ruby1.8 \ libdrb-ruby1.8 \ liberb-ruby1.8 \ libgdbm-ruby1.8 \ libiconv-ruby1.8 \ libopenssl-ruby1.8 \ libpty-ruby1.8 \ libracc-runtime-ruby1.8 \ libreadline-ruby1.8 \ librexml-ruby1.8 \ libruby1.8 \ libruby1.8-dbg \ libsdbm-ruby1.8 \ libsoap-ruby1.8 \ libstrscan-ruby1.8 \ libsyslog-ruby1.8 \ libtest-unit-ruby1.8 \ libwebrick-ruby1.8 \ libxmlrpc-ruby1.8 \ libyaml-ruby1.8 \ libzlib-ruby1.8 \ rdoc1.8 \ ri1.8 \ ruby1.8 \ ruby1.8-dev \ ruby1.8-examples \ 2>&1 | tee -a apt-get.log # Symlinks for script sheebang lines. ln -s /usr/bin/ruby1.8 /usr/local/bin/ruby18 ln -s /usr/bin/ruby /usr/local/bin/ruby # Install rubygems and required Debian packages first. ( gem install rake gem install --include-dependencies rails gem install rmagick gem install RedCloth gem install --include-dependencies dev-utils gem install --include-dependencies net-ssh ) 2>&1 | tee gem.log> > But, when I go to run webrick, rails isn''t very happy: > > $ ruby script/server > /usr/lib/ruby/gems/1.8/gems/actionpack-1.8.1/lib/action_controller.rb:52: > undefined method `template_class='' for ActionController::Base:Class > (NoMethodError) > from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:18:in > `require__'' > from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:18:in > `require'' > from /usr/lib/ruby/gems/1.8/gems/activesupport-1.0.4/lib/active_support/dependencies.rb:197:in > `require'' > from /usr/local/lib/site_ruby/1.8/rubygems.rb:175:in `activate'' > from /usr/local/lib/site_ruby/1.8/rubygems.rb:37:in > `require_gem_with_options'' > from /usr/local/lib/site_ruby/1.8/rubygems.rb:31:in `require_gem'' > from ./script/../config/environment.rb:33 > from script/server:42:in `require'' > from script/server:42 > > Can any expert look at this and say "oh yes, you''re missing the ''such > and such'' package"? All the other errors I''ve had so far very > explicitely said that I was missing zlib-ruby or rdoc or whatnot, but > I can''t make any sense of this. I''m not sure if I''m missing some > dependency or what. > > Also, the rails project I''m trying to do this in was written in rails > 0.11.1, but of course the gems I just installed were for rails 0.12.1. > Could that be the cause? I tried updating my rails project with "rails > ." in the top level of the project, but got the same output as above. > > Not sure what''s going on, any help is appreciated. Thanks. >Cheers, Stuart -- Stuart Rackham http://www.methods.co.nz/asciidoc/ -- Text based document generation
On 4/26/05, Stuart Rackham <srackham-yZTdQaUi3UlBWQWeTLFoew@public.gmane.org> wrote:> # Install Ruby and libs. > apt-get --quiet install \ > irb1.8 \ > libbigdecimal-ruby1.8 \ > libcurses-ruby1.8 \ > libdbm-ruby1.8 \ > libdl-ruby1.8 \ > libdrb-ruby1.8 \ > liberb-ruby1.8 \ > libgdbm-ruby1.8 \ > libiconv-ruby1.8 \ > libopenssl-ruby1.8 \ > libpty-ruby1.8 \ > libracc-runtime-ruby1.8 \ > libreadline-ruby1.8 \ > librexml-ruby1.8 \ > libruby1.8 \ > libruby1.8-dbg \ > libsdbm-ruby1.8 \ > libsoap-ruby1.8 \ > libstrscan-ruby1.8 \ > libsyslog-ruby1.8 \ > libtest-unit-ruby1.8 \ > libwebrick-ruby1.8 \ > libxmlrpc-ruby1.8 \ > libyaml-ruby1.8 \ > libzlib-ruby1.8 \ > rdoc1.8 \ > ri1.8 \ > ruby1.8 \ > ruby1.8-dev \ > ruby1.8-examples \ > 2>&1 | tee -a apt-get.logOh, thank you for this, it solved the problem. Now webrick will actually start up and run, but of course I''m having authentication errors... PGError in Photos#show FATAL: IDENT authentication failed for user "rbpark" app/controllers/photos_controller.rb:24:in `show'' script/server:48 I can connect fine with psql and it doesn''t even prompt for a password, I have the "rbpark" user in postgres set as admin, so I should be able to do anything... I''ll have to look into this some more. -- Urban Artography http://artography.ath.cx
> Oh, thank you for this, it solved the problem. Now webrick will > actually start up and run, but of course I''m having authentication > errors... > > PGError in Photos#show > > FATAL: IDENT authentication failed for user "rbpark" > > app/controllers/photos_controller.rb:24:in `show'' > script/server:48 > > I can connect fine with psql and it doesn''t even prompt for a > password, I have the "rbpark" user in postgres set as admin, so I > should be able to do anything...Postgres is trying to authenticate the user using IDENT, which obviously isn''t working. If you''re not worried about security, try setting the method to trust in pg_hba.conf, or md5 if you want to use a password. -- Phillip Hutchings http://www.sitharus.com/ sitharus-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org / sitharus-QrR4M9swfipWk0Htik3J/w@public.gmane.org
Phillip Hutchings wrote:>>Oh, thank you for this, it solved the problem. Now webrick will >>actually start up and run, but of course I''m having authentication >>errors... >> >> PGError in Photos#show >> >>FATAL: IDENT authentication failed for user "rbpark" >> >>app/controllers/photos_controller.rb:24:in `show'' >>script/server:48 >> >>I can connect fine with psql and it doesn''t even prompt for a >>password, I have the "rbpark" user in postgres set as admin, so I >>should be able to do anything... >> >> > >Postgres is trying to authenticate the user using IDENT, which >obviously isn''t working. If you''re not worried about security, try >setting the method to trust in pg_hba.conf, or md5 if you want to use >a password. > > >A slight addition to what was already said. The problem you have encountered is due to the way postgres does it''s authentication. Using psql the connection is done through a unix socket, rails attempts to connect by IP from localhost, the standard postgresql authentication file treats these differently leading to the error you encountered.
GMail strikes again! *smack* somebody needs to learn to press "reply to all", not "reply". On 4/26/05, David Tulloh <david.tulloh-FCV4sgi5zeUQrrorzV6ljw@public.gmane.org> wrote:> A slight addition to what was already said. The problem you have > encountered is due to the way postgres does it''s authentication. Using > psql the connection is done through a unix socket, rails attempts to > connect by IP from localhost, the standard postgresql authentication > file treats these differently leading to the error you encountered.Yup, and I said as much when I replied to my second message (that I installed postgres but forgot to actually configure it), except that reply went off-list and directly to Stuart. -- Urban Artography http://artography.ath.cx