[typo] help needed - switching to fcgi gives typo error

zer0halo zerohalo at gmail.com
Wed Aug 3 12:20:37 EDT 2005


Thanks, Tobi. I am able to log in to /admin/, and am presented with
the option to perform the database migration (none of the other tabs
in the admin section work). However, when attempting to do so I get
the following error:

 ActiveRecord::StatementInvalid in Admin/general#migrate

Duplicate column name 'user_id': ALTER TABLE articles ADD user_id int(11)

I have typo, typo_dev and typo_tests all created with the same structure. 

My /config/environment.rb points to production:

RAILS_ENV  = ENV['RAILS_ENV'] || 'production'


On 8/3/05, Tobias Luetke <tobias.luetke at gmail.com> wrote:
> its probably because your fastcgi runs in production environment and
> your other tests in development environment.
> 
> try to go to /admin/ and update the database schema
> 
> On 8/3/05, zer0halo <zerohalo at gmail.com> wrote:
> > I've been using typo with WEBrick, but when trying to get it going
> > with fastcgi, I get the following error:
> >
> >  NoMethodError in Articles#index
> >
> > Here's the log output for the error:
> >
> > Processing ArticlesController#index (for 127.0.0.1 at Tue Aug 02
> > 22:14:38 MDT 2005)
> >   Parameters: {"action"=>"index", "controller"=>"articles"}
> > Rendering  within ../../themes/azure/layouts/default
> > Rendering articles/index (200 OK)
> >
> > ActionView::TemplateError (undefined method `permalink' for
> > #<Article:0xb77f4b2c>) on line #1 of /articles/_article.rhtml:
> > 1: <h2><%= article_link article.title, article %></h2>
> > 2: <p class="auth">Posted by <%= author_link(article) %>
> > 3: <%= js_distance_of_time_in_words_to_now article.created_at %></p>
> > 4: <%= article.body_html %>
> >
> >     /gems/activerecord-1.11.1/lib/active_record/base.rb:1203:in `method_missing'
> >     /var/www/typoconfig/..//app/helpers/application_helper.rb:77:in
> > `article_url'
> >     /var/www/typoconfig/..//app/helpers/application_helper.rb:65:in
> > `article_link'
> >     (erb):1:in `evaluate_locals'
> >     /gems/actionpack-1.9.1/lib/action_view/base.rb:272:in `evaluate_locals'
> >     /gems/actionpack-1.9.1/lib/action_view/base.rb:283:in `rhtml_render'
> >     /gems/actionpack-1.9.1/lib/action_view/base.rb:208:in `send'
> >     /gems/actionpack-1.9.1/lib/action_view/base.rb:208:in `render_template'
> >     /gems/actionpack-1.9.1/lib/action_view/base.rb:173:in `render_file'
> >     /gems/actionpack-1.9.1/lib/action_view/base.rb:188:in `render'
> >     /gems/actionpack-1.9.1/lib/action_view/partials.rb:55:in `render_partial'
> >     (erb):3:in `evaluate_locals'
> >     (erb):1:in `each'
> >     (erb):1:in `evaluate_locals'
> >     /gems/actionpack-1.9.1/lib/action_view/base.rb:272:in `evaluate_locals'
> >     /gems/actionpack-1.9.1/lib/action_view/base.rb:283:in `rhtml_render'
> >     /gems/actionpack-1.9.1/lib/action_view/base.rb:208:in `send'
> >     /gems/actionpack-1.9.1/lib/action_view/base.rb:208:in `render_template'
> >     /gems/actionpack-1.9.1/lib/action_view/base.rb:173:in `render_file'
> >     /gems/actionpack-1.9.1/lib/action_controller/base.rb:588:in
> > `render_with_no_layout'
> >     /gems/actionpack-1.9.1/lib/action_controller/layout.rb:216:in
> > `render_without_benchmark'
> >     /gems/actionpack-1.9.1/lib/action_controller/benchmarking.rb:25:in `render'
> >     /gems/actionpack-1.9.1/lib/action_controller/benchmarking.rb:25:in `measure'
> >     /gems/actionpack-1.9.1/lib/action_controller/benchmarking.rb:25:in `render'
> >     /gems/actionpack-1.9.1/lib/action_controller/base.rb:591:in
> > `render_with_no_layout'
> >     /gems/actionpack-1.9.1/lib/action_controller/layout.rb:216:in
> > `render_without_benchmark'
> >     /gems/actionpack-1.9.1/lib/action_controller/benchmarking.rb:25:in `render'
> >     /gems/actionpack-1.9.1/lib/action_controller/benchmarking.rb:25:in `measure'
> >     /gems/actionpack-1.9.1/lib/action_controller/benchmarking.rb:25:in `render'
> >     /gems/actionpack-1.9.1/lib/action_controller/base.rb:604:in
> > `render_with_no_layout'
> >     /gems/actionpack-1.9.1/lib/action_controller/layout.rb:216:in
> > `render_without_benchmark'
> >     /gems/actionpack-1.9.1/lib/action_controller/benchmarking.rb:25:in `render'
> >     /gems/actionpack-1.9.1/lib/action_controller/benchmarking.rb:25:in `measure'
> >     /gems/actionpack-1.9.1/lib/action_controller/benchmarking.rb:25:in `render'
> >     /gems/actionpack-1.9.1/lib/action_controller/base.rb:627:in
> > `render_with_no_layout'
> >     /gems/actionpack-1.9.1/lib/action_controller/layout.rb:210:in
> > `render_without_benchmark'
> >     /gems/actionpack-1.9.1/lib/action_controller/benchmarking.rb:25:in `render'
> >     /gems/actionpack-1.9.1/lib/action_controller/benchmarking.rb:25:in `measure'
> >     /gems/actionpack-1.9.1/lib/action_controller/benchmarking.rb:25:in `render'
> >     /gems/actionpack-1.9.1/lib/action_controller/base.rb:757:in
> > `perform_action_without_filters'
> >     /gems/actionpack-1.9.1/lib/action_controller/filters.rb:295:in
> > `perform_action_without_benchmark'
> >     /gems/actionpack-1.9.1/lib/action_controller/benchmarking.rb:41:in
> > `perform_action_without_rescue'
> >     /gems/actionpack-1.9.1/lib/action_controller/benchmarking.rb:41:in `measure'
> >     /gems/actionpack-1.9.1/lib/action_controller/benchmarking.rb:41:in
> > `perform_action_without_rescue'
> >     /gems/actionpack-1.9.1/lib/action_controller/rescue.rb:80:in
> > `perform_action'
> >     /gems/actionpack-1.9.1/lib/action_controller/base.rb:356:in `send'
> >     /gems/actionpack-1.9.1/lib/action_controller/base.rb:356:in `process'
> >     /gems/rails-0.13.1/lib/dispatcher.rb:32:in `dispatch'
> >     /gems/rails-0.13.1/lib/fcgi_handler.rb:144:in `process_request'
> >     /gems/rails-0.13.1/lib/fcgi_handler.rb:64:in `process!'
> >     /gems/rails-0.13.1/lib/fcgi_handler.rb:55:in `each_cgi'
> >     /usr/lib/ruby/1.8/fcgi.rb:597:in `each'
> >     /usr/lib/ruby/1.8/fcgi.rb:597:in `each_cgi'
> >     /gems/rails-0.13.1/lib/fcgi_handler.rb:55:in `process!'
> >     /gems/rails-0.13.1/lib/fcgi_handler.rb:21:in `process!'
> >     /var/www/typo/public/dispatch.fcgi:24
> >
> >
> > Rendering /usr/lib/ruby/gems/1.8/gems/actionpack-1.9.1/lib/action_controller/templates/rescues/layout.rhtml
> > (500 Internal Error)
> >
> > Any help? Thanks!
> >
> > --
> > "Impossible is nothing."
> >
> > _______________________________________________
> > Typo-list mailing list
> > Typo-list at rubyforge.org
> > http://rubyforge.org/mailman/listinfo/typo-list
> >
> 
> 
> --
> Tobi
> http://www.snowdevil.ca - Snowboards that don't suck
> http://typo.leetsoft.com - Open source weblog engine
> http://blog.leetsoft.com - Technical weblog
> 
> _______________________________________________
> Typo-list mailing list
> Typo-list at rubyforge.org
> http://rubyforge.org/mailman/listinfo/typo-list
> 


-- 
"Impossible is nothing."



More information about the Typo-list mailing list