From denis.jacquemin at gmail.com Fri Jul 20 08:51:45 2007 From: denis.jacquemin at gmail.com (Denis Jacquemin) Date: Fri, 20 Jul 2007 14:51:45 +0200 Subject: [Nrr-general] =?windows-1252?q?Undefined_local_variable_or_method?= =?windows-1252?q?_=91acts=5Fas=5Fpoll=92_for_CivicDutyPoll=3AClass?= Message-ID: <6340c8370707200551o56ae0b0fi7f6c3fcba77e89a3@mail.gmail.com> Hi all, Following my comment on http://nrr.netsoft.ro/articles/2007/07/06/civicduty-plugin-de-rails-pentru-polling, As suggested the mailing list is a better place to post... So, here is my problem again: When I try to create a new poll by running the 'create_poll.rb' script, I get an error 'undefined local variable or method 'acts_as_poll' for CivicDutyPoll:Class' Your answer was: "it sounds as though the plugin isn't installed correctly. Can you confirm that you have (at least) this file: vendor/plugins/civicduty/lib/civic_duty.rb ?" Yes, I've this file, here is the content of the file Thanks for your help, Denis module CivicDuty module ActsAsPoll def self.included(base) base.extend ClassMethods end module ClassMethods def acts_as_poll extend CivicDuty::CivicDutyClassMethods end end end module CivicDutyClassMethods def get(poll_name) self.find :all, :conditions => [ 'name = ?', poll_name ] end end end -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/nrr-general/attachments/20070720/95f270ba/attachment.html From amir at shah.org Fri Jul 20 16:44:16 2007 From: amir at shah.org (Amir Shah) Date: Fri, 20 Jul 2007 16:44:16 -0400 Subject: [Nrr-general] (no subject) Message-ID: Hello, I would like to use this plugin to integrate polling into the Beast forums. Following the directions given at your site I typed in "script/generate civic_duty" and was presented with this screen: Usage: script/generate generator [options] [args] Rails Info: -v, --version Show the Rails version number and quit. -h, --help Show this help message and quit. General Options: -p, --pretend Run but do not make any changes. -f, --force Overwrite files that already exist. -s, --skip Skip files that already exist. -q, --quiet Suppress normal output. -t, --backtrace Debugging: show backtrace on errors. -c, --svn Modify files with subversion. (Note: svn must be in path) Installed Generators Plugins: civic_duty, civic_duty, exception_migration Builtin: controller, integration_test, mailer, migration, model, observer, plugin, resource, scaffold, scaffold_resource, session_migration, web_service More are available at http://rubyonrails.org/show/Generators 1. Download, for example, login_generator.zip 2. Unzip to directory /Users/amir/.rails/generators/login to use the generator with all your Rails apps or to /Users/amir/Projects/Beast/generators/login to use with this app only. 3. Run generate with no arguments for usage information script/generate login Generator gems are also available: 1. gem search -r generator 2. gem install login_generator 3. script/generate login amir$ Any idea what it means, and how I can fix it? Thanks -Amir From alxx at indigenious.ro Mon Jul 23 05:16:29 2007 From: alxx at indigenious.ro (Alex Deva) Date: Mon, 23 Jul 2007 12:16:29 +0300 Subject: [Nrr-general] (no subject) Message-ID: Amir, The generator problem was very weird; it seems that the doc/ directory was causing the problem, although I can't yet understand why. You can either delete your doc directory: rm -frd vendor/plugins/civicduty/doc or you can checkout the entire plugin again (i've deleted it on the SVN). I'm sorry about the inconvenience. The documentation was the last thing I've done, and I haven't tested the generator after that... Thanks, let me know how it works now! alxx From alxx at indigenious.ro Mon Jul 23 05:24:03 2007 From: alxx at indigenious.ro (Alex Deva) Date: Mon, 23 Jul 2007 12:24:03 +0300 Subject: [Nrr-general] =?windows-1252?q?Undefined_local_variable_or_method?= =?windows-1252?q?_=91acts=5Fas=5Fpoll=92_for_CivicDutyPoll=3AClass?= Message-ID: <5C9EDF0D-35EA-45E5-AA72-7F9DD54BD419@indigenious.ro> Hi Denis, sorry about the delay. Obviously you have the acts_as_poll method, so the problem is elsewhere. It's likely that the installation didn't go ok, since I've just fixed a strange generator bug (see my previous email in the list). In that case, please check that the following files exist: app/models/civic_duty_poll.rb and a migration in db/migrate, labeled "xxx_create_polls" Also, have you run rake db:migrate? Did that work? Do you have the civic_duty_polls table in your database? Please let me know! Thanks, alxx From denis.jacquemin at gmail.com Tue Aug 7 06:50:03 2007 From: denis.jacquemin at gmail.com (Denis Jacquemin) Date: Tue, 7 Aug 2007 12:50:03 +0200 Subject: [Nrr-general] =?windows-1252?q?Undefined_local_variable_or_method?= =?windows-1252?q?_=91acts=5Fas=5Fpoll=92_for_CivicDutyPoll=3AClass?= In-Reply-To: <5C9EDF0D-35EA-45E5-AA72-7F9DD54BD419@indigenious.ro> References: <5C9EDF0D-35EA-45E5-AA72-7F9DD54BD419@indigenious.ro> Message-ID: <6340c8370708070350h63d1bf78i2a81db75c7f32d@mail.gmail.com> hi Alex, back from holiday... back into rails ;o) So, the app/models/civic_duty_poll.rb file exist, here is the content class CivicDutyPoll < ActiveRecord::Base # The poll model. acts_as_poll end The migration exist 002_create_polls.rb, here it is class CreatePolls < ActiveRecord::Migration def self.up create_table :civic_duty_polls do |t| t.column "name", :string t.column "question", :string t.column "answer", :string t.column "votes", :integer, :default => 0 end end def self.down drop_table :civic_duty_polls end end the rake db:migrate was ok the table is in the db. the 'doc' directory was removed by hand and I still get the error at the end of the create_poll.rb script c:/ruby/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/commands/runner.rb:45: undefined local variable or method `acts_as_poll' for CivicDutyPoll:Class (NameError) Thanks for your help, Denis On 7/23/07, Alex Deva wrote: > > Hi Denis, sorry about the delay. > > Obviously you have the acts_as_poll method, so the problem is elsewhere. > > It's likely that the installation didn't go ok, since I've just fixed > a strange generator bug (see my previous email in the list). In that > case, please check that the following files exist: > > app/models/civic_duty_poll.rb > > and a migration in db/migrate, labeled "xxx_create_polls" > > Also, have you run rake db:migrate? Did that work? Do you have the > civic_duty_polls table in your database? > > Please let me know! > > Thanks, > > alxx > _______________________________________________ > Nrr-general mailing list > Nrr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/nrr-general > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/nrr-general/attachments/20070807/c333d1b6/attachment.html From alxx at indigenious.ro Tue Aug 7 14:09:57 2007 From: alxx at indigenious.ro (Alex Deva) Date: Tue, 7 Aug 2007 21:09:57 +0300 Subject: [Nrr-general] =?windows-1252?q?Undefined_local_variable_or_method?= =?windows-1252?q?_=91acts=5Fas=5Fpoll=92_for_CivicDutyPoll=3AClass?= In-Reply-To: <6340c8370708070350h63d1bf78i2a81db75c7f32d@mail.gmail.com> References: <5C9EDF0D-35EA-45E5-AA72-7F9DD54BD419@indigenious.ro> <6340c8370708070350h63d1bf78i2a81db75c7f32d@mail.gmail.com> Message-ID: <5FB624DA-F284-4DB5-9672-4E1AB8620384@indigenious.ro> Denis, I am very puzzled by your problem, and I'm completely unable to replicate it no matter what. What versions of Ruby and RoR are you using? Have you ever installed an "acts_as..." plugin before? Are you sure there's nothing else helpful in the logs? Alex On Aug 7, 2007, at 1:50 PM, Denis Jacquemin wrote: > hi Alex, back from holiday... back into rails ;o) > > So, the app/models/civic_duty_poll.rb file exist, here is the content > class CivicDutyPoll < ActiveRecord::Base > > # The poll model. > > acts_as_poll > > end > > The migration exist 002_create_polls.rb, here it is > class CreatePolls < ActiveRecord::Migration > def self.up > create_table :civic_duty_polls do |t| > t.column "name", :string > t.column "question", :string > t.column "answer", :string > t.column "votes", :integer, :default => 0 > end > end > > def self.down > drop_table :civic_duty_polls > end > end > > the rake db:migrate was ok the table is in the db. > > the 'doc' directory was removed by hand and I still get the error > at the end of the create_poll.rb script > > c:/ruby/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/commands/runner.rb: > 45: undefined > local variable or method `acts_as_poll' for CivicDutyPoll:Class > (NameError) > > Thanks for your help, > Denis > > > On 7/23/07, Alex Deva wrote: > Hi Denis, sorry about the delay. > > Obviously you have the acts_as_poll method, so the problem is > elsewhere. > > It's likely that the installation didn't go ok, since I've just fixed > a strange generator bug (see my previous email in the list). In that > case, please check that the following files exist: > > app/models/civic_duty_poll.rb > > and a migration in db/migrate, labeled "xxx_create_polls" > > Also, have you run rake db:migrate? Did that work? Do you have the > civic_duty_polls table in your database? > > Please let me know! > > Thanks, > > alxx > _______________________________________________ > Nrr-general mailing list > Nrr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/nrr-general > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/nrr-general/attachments/20070807/f297a333/attachment.html From alxx at indigenious.ro Wed Aug 8 03:51:36 2007 From: alxx at indigenious.ro (Alex Deva) Date: Wed, 8 Aug 2007 10:51:36 +0300 Subject: [Nrr-general] =?windows-1252?q?Undefined_local_variable_or_method?= =?windows-1252?q?_=91acts=5Fas=5Fpoll=92_for_CivicDutyPoll=3AClass?= In-Reply-To: <6340c8370708070350h63d1bf78i2a81db75c7f32d@mail.gmail.com> References: <5C9EDF0D-35EA-45E5-AA72-7F9DD54BD419@indigenious.ro> <6340c8370708070350h63d1bf78i2a81db75c7f32d@mail.gmail.com> Message-ID: <15EFCD7A-BF12-4333-A2F0-B5869ACC5480@indigenious.ro> Denis, I think the only way to hunt down this problem is this: Start a new rails application somewhere, and add the plugin to it. Make the necessary references into a controller and a view. You don't need to create a poll; try to run the application, test that view and see if you still get the same error, or a normal "poll not found" error. If you still get the same problem, zip the entire application and mail it to me. If not, then the problem is elsewhere... Alex On Aug 7, 2007, at 1:50 PM, Denis Jacquemin wrote: > hi Alex, back from holiday... back into rails ;o) > > So, the app/models/civic_duty_poll.rb file exist, here is the content > class CivicDutyPoll < ActiveRecord::Base > > # The poll model. > > acts_as_poll > > end > > The migration exist 002_create_polls.rb, here it is > class CreatePolls < ActiveRecord::Migration > def self.up > create_table :civic_duty_polls do |t| > t.column "name", :string > t.column "question", :string > t.column "answer", :string > t.column "votes", :integer, :default => 0 > end > end > > def self.down > drop_table :civic_duty_polls > end > end > > the rake db:migrate was ok the table is in the db. > > the 'doc' directory was removed by hand and I still get the error > at the end of the create_poll.rb script > > c:/ruby/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/commands/runner.rb: > 45: undefined > local variable or method `acts_as_poll' for CivicDutyPoll:Class > (NameError) > > Thanks for your help, > Denis > > > On 7/23/07, Alex Deva wrote: > Hi Denis, sorry about the delay. > > Obviously you have the acts_as_poll method, so the problem is > elsewhere. > > It's likely that the installation didn't go ok, since I've just fixed > a strange generator bug (see my previous email in the list). In that > case, please check that the following files exist: > > app/models/civic_duty_poll.rb > > and a migration in db/migrate, labeled "xxx_create_polls" > > Also, have you run rake db:migrate? Did that work? Do you have the > civic_duty_polls table in your database? > > Please let me know! > > Thanks, > > alxx > _______________________________________________ > Nrr-general mailing list > Nrr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/nrr-general > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/nrr-general/attachments/20070808/5db087b1/attachment-0001.html From denis.jacquemin at gmail.com Thu Aug 9 06:59:08 2007 From: denis.jacquemin at gmail.com (Denis Jacquemin) Date: Thu, 9 Aug 2007 12:59:08 +0200 Subject: [Nrr-general] =?windows-1252?q?Undefined_local_variable_or_method?= =?windows-1252?q?_=91acts=5Fas=5Fpoll=92_for_CivicDutyPoll=3AClass?= In-Reply-To: <15EFCD7A-BF12-4333-A2F0-B5869ACC5480@indigenious.ro> References: <5C9EDF0D-35EA-45E5-AA72-7F9DD54BD419@indigenious.ro> <6340c8370708070350h63d1bf78i2a81db75c7f32d@mail.gmail.com> <15EFCD7A-BF12-4333-A2F0-B5869ACC5480@indigenious.ro> Message-ID: <6340c8370708090359j546badf3lac91a401cdbc26b3@mail.gmail.com> Hi, I did a test project and I got the 'uninitialized constant PollController::CivicDuty' msg when I try to run http://localhost:3000/poll. Please find the project in attachment. I get the plugin from this link http://nrr.netsoft.ro/files/civicduty.zip, maybe the zip is not up to date? Thanks for your help Denis On 8/8/07, Alex Deva wrote: > > Denis, > > I think the only way to hunt down this problem is this: Start a new rails > application somewhere, and add the plugin to it. Make the necessary > references into a controller and a view. You don't need to create a poll; > try to run the application, test that view and see if you still get the same > error, or a normal "poll not found" error. > > If you still get the same problem, zip the entire application and mail it to > me. If not, then the problem is elsewhere... > > Alex > > > > On Aug 7, 2007, at 1:50 PM, Denis Jacquemin wrote: > > hi Alex, back from holiday... back into rails ;o) > > So, the app/models/civic_duty_poll.rb file exist, here is the content > class CivicDutyPoll < ActiveRecord::Base > > # The poll model. > > acts_as_poll > > end > > The migration exist 002_create_polls.rb, here it is > class CreatePolls < ActiveRecord::Migration > def self.up > create_table :civic_duty_polls do |t| > t.column "name", :string > t.column "question", :string > t.column "answer", :string > t.column "votes", :integer, :default => 0 > end > end > > def self.down > drop_table :civic_duty_polls > end > end > > the rake db:migrate was ok the table is in the db. > > the 'doc' directory was removed by hand and I still get the error at the end > of the create_poll.rb script > > c:/ruby/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/commands/runner.rb:45: > undefined > local variable or method `acts_as_poll' for CivicDutyPoll:Class (NameError) > > Thanks for your help, > Denis > > > On 7/23/07, Alex Deva wrote: > > Hi Denis, sorry about the delay. > > > > Obviously you have the acts_as_poll method, so the problem is elsewhere. > > > > It's likely that the installation didn't go ok, since I've just fixed > > a strange generator bug (see my previous email in the list). In that > > case, please check that the following files exist: > > > > app/models/civic_duty_poll.rb > > > > and a migration in db/migrate, labeled "xxx_create_polls" > > > > Also, have you run rake db:migrate? Did that work? Do you have the > > civic_duty_polls table in your database? > > > > Please let me know! > > > > Thanks, > > > > alxx > > _______________________________________________ > > Nrr-general mailing list > > Nrr-general at rubyforge.org > > http://rubyforge.org/mailman/listinfo/nrr-general > > > > > -------------- next part -------------- A non-text attachment was scrubbed... Name: TestPoll.zip Type: application/zip Size: 124228 bytes Desc: not available Url : http://rubyforge.org/pipermail/nrr-general/attachments/20070809/fc32f90b/attachment-0001.zip From alxx at indigenious.ro Thu Aug 9 08:39:17 2007 From: alxx at indigenious.ro (Alex Deva) Date: Thu, 9 Aug 2007 15:39:17 +0300 Subject: [Nrr-general] =?windows-1252?q?Undefined_local_variable_or_method?= =?windows-1252?q?_=91acts=5Fas=5Fpoll=92_for_CivicDutyPoll=3AClass?= In-Reply-To: <6340c8370708090359j546badf3lac91a401cdbc26b3@mail.gmail.com> References: <5C9EDF0D-35EA-45E5-AA72-7F9DD54BD419@indigenious.ro> <6340c8370708070350h63d1bf78i2a81db75c7f32d@mail.gmail.com> <15EFCD7A-BF12-4333-A2F0-B5869ACC5480@indigenious.ro> <6340c8370708090359j546badf3lac91a401cdbc26b3@mail.gmail.com> Message-ID: Denis, I won't pretend to understand it completely, but it seems that renaming vendor/plugins/civicduty into vendor/plugins/civic_duty will cause your application to run. My test application runs regardless of what I name the plugin directory, which is OK according to Rails docs... as long as there's a correct init.rb inside... Please try that and let me know. If it works, I'll fix it in the distribution. Alex On Aug 9, 2007, at 1:59 PM, Denis Jacquemin wrote: > Hi, > > I did a test project and I got the 'uninitialized constant > PollController::CivicDuty' msg when I try to run > http://localhost:3000/poll. > > Please find the project in attachment. > > I get the plugin from this link > http://nrr.netsoft.ro/files/civicduty.zip, maybe the zip is not up to > date? > > Thanks for your help > Denis > > On 8/8/07, Alex Deva wrote: >> >> Denis, >> >> I think the only way to hunt down this problem is this: Start a >> new rails >> application somewhere, and add the plugin to it. Make the necessary >> references into a controller and a view. You don't need to create >> a poll; >> try to run the application, test that view and see if you still >> get the same >> error, or a normal "poll not found" error. >> >> If you still get the same problem, zip the entire application and >> mail it to >> me. If not, then the problem is elsewhere... >> >> Alex >> >> >> >> On Aug 7, 2007, at 1:50 PM, Denis Jacquemin wrote: >> >> hi Alex, back from holiday... back into rails ;o) >> >> So, the app/models/civic_duty_poll.rb file exist, here is the content >> class CivicDutyPoll < ActiveRecord::Base >> >> # The poll model. >> >> acts_as_poll >> >> end >> >> The migration exist 002_create_polls.rb, here it is >> class CreatePolls < ActiveRecord::Migration >> def self.up >> create_table :civic_duty_polls do |t| >> t.column "name", :string >> t.column "question", :string >> t.column "answer", :string >> t.column "votes", :integer, :default => 0 >> end >> end >> >> def self.down >> drop_table :civic_duty_polls >> end >> end >> >> the rake db:migrate was ok the table is in the db. >> >> the 'doc' directory was removed by hand and I still get the error >> at the end >> of the create_poll.rb script >> >> c:/ruby/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/commands/runner.rb:45: >> undefined >> local variable or method `acts_as_poll' for CivicDutyPoll:Class >> (NameError) >> >> Thanks for your help, >> Denis >> >> >> On 7/23/07, Alex Deva wrote: >>> Hi Denis, sorry about the delay. >>> >>> Obviously you have the acts_as_poll method, so the problem is >>> elsewhere. >>> >>> It's likely that the installation didn't go ok, since I've just >>> fixed >>> a strange generator bug (see my previous email in the list). In that >>> case, please check that the following files exist: >>> >>> app/models/civic_duty_poll.rb >>> >>> and a migration in db/migrate, labeled "xxx_create_polls" >>> >>> Also, have you run rake db:migrate? Did that work? Do you have the >>> civic_duty_polls table in your database? >>> >>> Please let me know! >>> >>> Thanks, >>> >>> alxx >>> _______________________________________________ >>> Nrr-general mailing list >>> Nrr-general at rubyforge.org >>> http://rubyforge.org/mailman/listinfo/nrr-general >>> >> >> >> >> From denis.jacquemin at gmail.com Thu Aug 9 08:51:57 2007 From: denis.jacquemin at gmail.com (Denis Jacquemin) Date: Thu, 9 Aug 2007 14:51:57 +0200 Subject: [Nrr-general] =?windows-1252?q?Undefined_local_variable_or_method?= =?windows-1252?q?_=91acts=5Fas=5Fpoll=92_for_CivicDutyPoll=3AClass?= In-Reply-To: References: <5C9EDF0D-35EA-45E5-AA72-7F9DD54BD419@indigenious.ro> <6340c8370708070350h63d1bf78i2a81db75c7f32d@mail.gmail.com> <15EFCD7A-BF12-4333-A2F0-B5869ACC5480@indigenious.ro> <6340c8370708090359j546badf3lac91a401cdbc26b3@mail.gmail.com> Message-ID: <6340c8370708090551k3dc5d086o168af058b1b48546@mail.gmail.com> >renaming vendor/plugins/civicduty into vendor/plugins/civic_duty will > cause your application to run. Yes! is works fine now... Thanks you Denis On 8/9/07, Alex Deva wrote: > Denis, > > I won't pretend to understand it completely, but it seems that > renaming vendor/plugins/civicduty into vendor/plugins/civic_duty will > cause your application to run. > > My test application runs regardless of what I name the plugin > directory, which is OK according to Rails docs... as long as there's > a correct init.rb inside... > > Please try that and let me know. If it works, I'll fix it in the > distribution. > > Alex > > On Aug 9, 2007, at 1:59 PM, Denis Jacquemin wrote: > > > Hi, > > > > I did a test project and I got the 'uninitialized constant > > PollController::CivicDuty' msg when I try to run > > http://localhost:3000/poll. > > > > Please find the project in attachment. > > > > I get the plugin from this link > > http://nrr.netsoft.ro/files/civicduty.zip, maybe the zip is not up to > > date? > > > > Thanks for your help > > Denis > > > > On 8/8/07, Alex Deva wrote: > >> > >> Denis, > >> > >> I think the only way to hunt down this problem is this: Start a > >> new rails > >> application somewhere, and add the plugin to it. Make the necessary > >> references into a controller and a view. You don't need to create > >> a poll; > >> try to run the application, test that view and see if you still > >> get the same > >> error, or a normal "poll not found" error. > >> > >> If you still get the same problem, zip the entire application and > >> mail it to > >> me. If not, then the problem is elsewhere... > >> > >> Alex > >> > >> > >> > >> On Aug 7, 2007, at 1:50 PM, Denis Jacquemin wrote: > >> > >> hi Alex, back from holiday... back into rails ;o) > >> > >> So, the app/models/civic_duty_poll.rb file exist, here is the content > >> class CivicDutyPoll < ActiveRecord::Base > >> > >> # The poll model. > >> > >> acts_as_poll > >> > >> end > >> > >> The migration exist 002_create_polls.rb, here it is > >> class CreatePolls < ActiveRecord::Migration > >> def self.up > >> create_table :civic_duty_polls do |t| > >> t.column "name", :string > >> t.column "question", :string > >> t.column "answer", :string > >> t.column "votes", :integer, :default => 0 > >> end > >> end > >> > >> def self.down > >> drop_table :civic_duty_polls > >> end > >> end > >> > >> the rake db:migrate was ok the table is in the db. > >> > >> the 'doc' directory was removed by hand and I still get the error > >> at the end > >> of the create_poll.rb script > >> > >> c:/ruby/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/commands/runner.rb:45: > >> undefined > >> local variable or method `acts_as_poll' for CivicDutyPoll:Class > >> (NameError) > >> > >> Thanks for your help, > >> Denis > >> > >> > >> On 7/23/07, Alex Deva wrote: > >>> Hi Denis, sorry about the delay. > >>> > >>> Obviously you have the acts_as_poll method, so the problem is > >>> elsewhere. > >>> > >>> It's likely that the installation didn't go ok, since I've just > >>> fixed > >>> a strange generator bug (see my previous email in the list). In that > >>> case, please check that the following files exist: > >>> > >>> app/models/civic_duty_poll.rb > >>> > >>> and a migration in db/migrate, labeled "xxx_create_polls" > >>> > >>> Also, have you run rake db:migrate? Did that work? Do you have the > >>> civic_duty_polls table in your database? > >>> > >>> Please let me know! > >>> > >>> Thanks, > >>> > >>> alxx > >>> _______________________________________________ > >>> Nrr-general mailing list > >>> Nrr-general at rubyforge.org > >>> http://rubyforge.org/mailman/listinfo/nrr-general > >>> > >> > >> > >> > >> > > From alxx at indigenious.ro Thu Aug 9 09:06:05 2007 From: alxx at indigenious.ro (Alex Deva) Date: Thu, 9 Aug 2007 16:06:05 +0300 Subject: [Nrr-general] =?windows-1252?q?Undefined_local_variable_or_method?= =?windows-1252?q?_=91acts=5Fas=5Fpoll=92_for_CivicDutyPoll=3AClass?= In-Reply-To: <6340c8370708090551k3dc5d086o168af058b1b48546@mail.gmail.com> References: <5C9EDF0D-35EA-45E5-AA72-7F9DD54BD419@indigenious.ro> <6340c8370708070350h63d1bf78i2a81db75c7f32d@mail.gmail.com> <15EFCD7A-BF12-4333-A2F0-B5869ACC5480@indigenious.ro> <6340c8370708090359j546badf3lac91a401cdbc26b3@mail.gmail.com> <6340c8370708090551k3dc5d086o168af058b1b48546@mail.gmail.com> Message-ID: <17416652-A497-4B31-A316-EB1D305AA32A@indigenious.ro> I've uploaded release 1.1 on SVN. Due to the directory name change, the install command now is: script/plugin install svn://rubyforge.org/var/svn/nrr/civic_duty Enjoy! On Aug 9, 2007, at 3:51 PM, Denis Jacquemin wrote: >> renaming vendor/plugins/civicduty into vendor/plugins/civic_duty will >> cause your application to run. > > Yes! is works fine now... > > Thanks you > Denis > > On 8/9/07, Alex Deva wrote: >> Denis, >> >> I won't pretend to understand it completely, but it seems that >> renaming vendor/plugins/civicduty into vendor/plugins/civic_duty will >> cause your application to run. >> >> My test application runs regardless of what I name the plugin >> directory, which is OK according to Rails docs... as long as there's >> a correct init.rb inside... >> >> Please try that and let me know. If it works, I'll fix it in the >> distribution. >> >> Alex >> >> On Aug 9, 2007, at 1:59 PM, Denis Jacquemin wrote: >> >>> Hi, >>> >>> I did a test project and I got the 'uninitialized constant >>> PollController::CivicDuty' msg when I try to run >>> http://localhost:3000/poll. >>> >>> Please find the project in attachment. >>> >>> I get the plugin from this link >>> http://nrr.netsoft.ro/files/civicduty.zip, maybe the zip is not >>> up to >>> date? >>> >>> Thanks for your help >>> Denis >>> >>> On 8/8/07, Alex Deva wrote: >>>> >>>> Denis, >>>> >>>> I think the only way to hunt down this problem is this: Start a >>>> new rails >>>> application somewhere, and add the plugin to it. Make the necessary >>>> references into a controller and a view. You don't need to create >>>> a poll; >>>> try to run the application, test that view and see if you still >>>> get the same >>>> error, or a normal "poll not found" error. >>>> >>>> If you still get the same problem, zip the entire application and >>>> mail it to >>>> me. If not, then the problem is elsewhere... >>>> >>>> Alex >>>> >>>> >>>> >>>> On Aug 7, 2007, at 1:50 PM, Denis Jacquemin wrote: >>>> >>>> hi Alex, back from holiday... back into rails ;o) >>>> >>>> So, the app/models/civic_duty_poll.rb file exist, here is the >>>> content >>>> class CivicDutyPoll < ActiveRecord::Base >>>> >>>> # The poll model. >>>> >>>> acts_as_poll >>>> >>>> end >>>> >>>> The migration exist 002_create_polls.rb, here it is >>>> class CreatePolls < ActiveRecord::Migration >>>> def self.up >>>> create_table :civic_duty_polls do |t| >>>> t.column "name", :string >>>> t.column "question", :string >>>> t.column "answer", :string >>>> t.column "votes", :integer, :default => 0 >>>> end >>>> end >>>> >>>> def self.down >>>> drop_table :civic_duty_polls >>>> end >>>> end >>>> >>>> the rake db:migrate was ok the table is in the db. >>>> >>>> the 'doc' directory was removed by hand and I still get the error >>>> at the end >>>> of the create_poll.rb script >>>> >>>> c:/ruby/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/commands/ >>>> runner.rb:45: >>>> undefined >>>> local variable or method `acts_as_poll' for CivicDutyPoll:Class >>>> (NameError) >>>> >>>> Thanks for your help, >>>> Denis >>>> >>>> >>>> On 7/23/07, Alex Deva wrote: >>>>> Hi Denis, sorry about the delay. >>>>> >>>>> Obviously you have the acts_as_poll method, so the problem is >>>>> elsewhere. >>>>> >>>>> It's likely that the installation didn't go ok, since I've just >>>>> fixed >>>>> a strange generator bug (see my previous email in the list). In >>>>> that >>>>> case, please check that the following files exist: >>>>> >>>>> app/models/civic_duty_poll.rb >>>>> >>>>> and a migration in db/migrate, labeled "xxx_create_polls" >>>>> >>>>> Also, have you run rake db:migrate? Did that work? Do you have the >>>>> civic_duty_polls table in your database? >>>>> >>>>> Please let me know! >>>>> >>>>> Thanks, >>>>> >>>>> alxx >>>>> _______________________________________________ >>>>> Nrr-general mailing list >>>>> Nrr-general at rubyforge.org >>>>> http://rubyforge.org/mailman/listinfo/nrr-general >>>>> >>>> >>>> >>>> >>>> >> >> From denis.jacquemin at gmail.com Thu Aug 9 09:30:44 2007 From: denis.jacquemin at gmail.com (Denis Jacquemin) Date: Thu, 9 Aug 2007 15:30:44 +0200 Subject: [Nrr-general] =?windows-1252?q?Undefined_local_variable_or_method?= =?windows-1252?q?_=91acts=5Fas=5Fpoll=92_for_CivicDutyPoll=3AClass?= In-Reply-To: <17416652-A497-4B31-A316-EB1D305AA32A@indigenious.ro> References: <5C9EDF0D-35EA-45E5-AA72-7F9DD54BD419@indigenious.ro> <6340c8370708070350h63d1bf78i2a81db75c7f32d@mail.gmail.com> <15EFCD7A-BF12-4333-A2F0-B5869ACC5480@indigenious.ro> <6340c8370708090359j546badf3lac91a401cdbc26b3@mail.gmail.com> <6340c8370708090551k3dc5d086o168af058b1b48546@mail.gmail.com> <17416652-A497-4B31-A316-EB1D305AA32A@indigenious.ro> Message-ID: <6340c8370708090630w4d53bf5aoa290b74c1d319408@mail.gmail.com> Yep, For any reason I cannot use the SVN version, so I'm still working with the old zip archive. I've updated all the path in civic_duty_actions.rb and civic_duty_helper.rb but I still get this error " Errno::ENOENT in Post#index Showing app/views/some_poll/show_poll.rhtml where line # raised: No such file or directory - ./script/../config/../app/views/some_poll/show_poll.rhtml " Well I don't understand how plugins works, I guess he should look under the vendor directory for the views, but he don't... I'm lost ;o) On 8/9/07, Alex Deva wrote: > I've uploaded release 1.1 on SVN. > > Due to the directory name change, the install command now is: > > script/plugin install svn://rubyforge.org/var/svn/nrr/civic_duty > > Enjoy! > > > On Aug 9, 2007, at 3:51 PM, Denis Jacquemin wrote: > > >> renaming vendor/plugins/civicduty into vendor/plugins/civic_duty will > >> cause your application to run. > > > > Yes! is works fine now... > > > > Thanks you > > Denis > > > > On 8/9/07, Alex Deva wrote: > >> Denis, > >> > >> I won't pretend to understand it completely, but it seems that > >> renaming vendor/plugins/civicduty into vendor/plugins/civic_duty will > >> cause your application to run. > >> > >> My test application runs regardless of what I name the plugin > >> directory, which is OK according to Rails docs... as long as there's > >> a correct init.rb inside... > >> > >> Please try that and let me know. If it works, I'll fix it in the > >> distribution. > >> > >> Alex > >> > >> On Aug 9, 2007, at 1:59 PM, Denis Jacquemin wrote: > >> > >>> Hi, > >>> > >>> I did a test project and I got the 'uninitialized constant > >>> PollController::CivicDuty' msg when I try to run > >>> http://localhost:3000/poll. > >>> > >>> Please find the project in attachment. > >>> > >>> I get the plugin from this link > >>> http://nrr.netsoft.ro/files/civicduty.zip, maybe the zip is not > >>> up to > >>> date? > >>> > >>> Thanks for your help > >>> Denis > >>> > >>> On 8/8/07, Alex Deva wrote: > >>>> > >>>> Denis, > >>>> > >>>> I think the only way to hunt down this problem is this: Start a > >>>> new rails > >>>> application somewhere, and add the plugin to it. Make the necessary > >>>> references into a controller and a view. You don't need to create > >>>> a poll; > >>>> try to run the application, test that view and see if you still > >>>> get the same > >>>> error, or a normal "poll not found" error. > >>>> > >>>> If you still get the same problem, zip the entire application and > >>>> mail it to > >>>> me. If not, then the problem is elsewhere... > >>>> > >>>> Alex > >>>> > >>>> > >>>> > >>>> On Aug 7, 2007, at 1:50 PM, Denis Jacquemin wrote: > >>>> > >>>> hi Alex, back from holiday... back into rails ;o) > >>>> > >>>> So, the app/models/civic_duty_poll.rb file exist, here is the > >>>> content > >>>> class CivicDutyPoll < ActiveRecord::Base > >>>> > >>>> # The poll model. > >>>> > >>>> acts_as_poll > >>>> > >>>> end > >>>> > >>>> The migration exist 002_create_polls.rb, here it is > >>>> class CreatePolls < ActiveRecord::Migration > >>>> def self.up > >>>> create_table :civic_duty_polls do |t| > >>>> t.column "name", :string > >>>> t.column "question", :string > >>>> t.column "answer", :string > >>>> t.column "votes", :integer, :default => 0 > >>>> end > >>>> end > >>>> > >>>> def self.down > >>>> drop_table :civic_duty_polls > >>>> end > >>>> end > >>>> > >>>> the rake db:migrate was ok the table is in the db. > >>>> > >>>> the 'doc' directory was removed by hand and I still get the error > >>>> at the end > >>>> of the create_poll.rb script > >>>> > >>>> c:/ruby/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/commands/ > >>>> runner.rb:45: > >>>> undefined > >>>> local variable or method `acts_as_poll' for CivicDutyPoll:Class > >>>> (NameError) > >>>> > >>>> Thanks for your help, > >>>> Denis > >>>> > >>>> > >>>> On 7/23/07, Alex Deva wrote: > >>>>> Hi Denis, sorry about the delay. > >>>>> > >>>>> Obviously you have the acts_as_poll method, so the problem is > >>>>> elsewhere. > >>>>> > >>>>> It's likely that the installation didn't go ok, since I've just > >>>>> fixed > >>>>> a strange generator bug (see my previous email in the list). In > >>>>> that > >>>>> case, please check that the following files exist: > >>>>> > >>>>> app/models/civic_duty_poll.rb > >>>>> > >>>>> and a migration in db/migrate, labeled "xxx_create_polls" > >>>>> > >>>>> Also, have you run rake db:migrate? Did that work? Do you have the > >>>>> civic_duty_polls table in your database? > >>>>> > >>>>> Please let me know! > >>>>> > >>>>> Thanks, > >>>>> > >>>>> alxx > >>>>> _______________________________________________ > >>>>> Nrr-general mailing list > >>>>> Nrr-general at rubyforge.org > >>>>> http://rubyforge.org/mailman/listinfo/nrr-general > >>>>> > >>>> > >>>> > >>>> > >>>> > >> > >> > > From alxx at indigenious.ro Thu Aug 9 09:40:38 2007 From: alxx at indigenious.ro (Alex Deva) Date: Thu, 9 Aug 2007 16:40:38 +0300 Subject: [Nrr-general] =?windows-1252?q?Undefined_local_variable_or_method?= =?windows-1252?q?_=91acts=5Fas=5Fpoll=92_for_CivicDutyPoll=3AClass?= In-Reply-To: <6340c8370708090630w4d53bf5aoa290b74c1d319408@mail.gmail.com> References: <5C9EDF0D-35EA-45E5-AA72-7F9DD54BD419@indigenious.ro> <6340c8370708070350h63d1bf78i2a81db75c7f32d@mail.gmail.com> <15EFCD7A-BF12-4333-A2F0-B5869ACC5480@indigenious.ro> <6340c8370708090359j546badf3lac91a401cdbc26b3@mail.gmail.com> <6340c8370708090551k3dc5d086o168af058b1b48546@mail.gmail.com> <17416652-A497-4B31-A316-EB1D305AA32A@indigenious.ro> <6340c8370708090630w4d53bf5aoa290b74c1d319408@mail.gmail.com> Message-ID: <88E310AB-5961-4879-A8ED-C8004267BCB6@indigenious.ro> Denis, If you can't install it from SVN, download the up-to-date archive from here: http://rubyforge.org/frs/download.php/23914/civic_duty.zip (Actually you can check the web at anytime on http://rubyforge.org/ projects/nrr for updates and downloads) As for the error, you obviously were trying the example from the README file "as is". If you look a bit closely and read the docs, you'll notice that the :view_dir option is used to specify an alternate location for RHTML files; in this case, app/views/some_poll which you don't have. If you want to have your own views, create that directory and copy in it the templates from vendor/plugins/civic_duty/views (then you can style them as you please). Or if you just want the plugin to work, then remove the :view_dir option from your view altogether, and it'll fall back to the default location for templates, and use those. Whew, I'm glad this time it's not my fault :) But maybe the docs should be clearer on this issue? Anyhow, I strongly recommend you get the new version of the plugin! And even regenerate everything from scratch, if you want to take advantage of the new column I've added in the migration ('updated_at'). You can use that value to know when the last vote was cast for a specific answer. But at the very least overwrite the plugin files with the new version, CivicDuty 1.1. Good luck! Alex On Aug 9, 2007, at 4:30 PM, Denis Jacquemin wrote: > Yep, > > For any reason I cannot use the SVN version, so I'm still working with > the old zip archive. > > I've updated all the path in civic_duty_actions.rb and > civic_duty_helper.rb > > but I still get this error > > " > Errno::ENOENT in Post#index > > Showing app/views/some_poll/show_poll.rhtml where line # raised: > > No such file or directory - > ./script/../config/../app/views/some_poll/show_poll.rhtml > " > > Well I don't understand how plugins works, I guess he should look > under the vendor directory for the views, but he don't... > > I'm lost ;o) > > > > On 8/9/07, Alex Deva wrote: >> I've uploaded release 1.1 on SVN. >> >> Due to the directory name change, the install command now is: >> >> script/plugin install svn://rubyforge.org/var/svn/nrr/civic_duty >> >> Enjoy! >> >> >> On Aug 9, 2007, at 3:51 PM, Denis Jacquemin wrote: >> >>>> renaming vendor/plugins/civicduty into vendor/plugins/civic_duty >>>> will >>>> cause your application to run. >>> >>> Yes! is works fine now... >>> >>> Thanks you >>> Denis >>> >>> On 8/9/07, Alex Deva wrote: >>>> Denis, >>>> >>>> I won't pretend to understand it completely, but it seems that >>>> renaming vendor/plugins/civicduty into vendor/plugins/civic_duty >>>> will >>>> cause your application to run. >>>> >>>> My test application runs regardless of what I name the plugin >>>> directory, which is OK according to Rails docs... as long as >>>> there's >>>> a correct init.rb inside... >>>> >>>> Please try that and let me know. If it works, I'll fix it in the >>>> distribution. >>>> >>>> Alex >>>> >>>> On Aug 9, 2007, at 1:59 PM, Denis Jacquemin wrote: >>>> >>>>> Hi, >>>>> >>>>> I did a test project and I got the 'uninitialized constant >>>>> PollController::CivicDuty' msg when I try to run >>>>> http://localhost:3000/poll. >>>>> >>>>> Please find the project in attachment. >>>>> >>>>> I get the plugin from this link >>>>> http://nrr.netsoft.ro/files/civicduty.zip, maybe the zip is not >>>>> up to >>>>> date? >>>>> >>>>> Thanks for your help >>>>> Denis >>>>> >>>>> On 8/8/07, Alex Deva wrote: >>>>>> >>>>>> Denis, >>>>>> >>>>>> I think the only way to hunt down this problem is this: Start a >>>>>> new rails >>>>>> application somewhere, and add the plugin to it. Make the >>>>>> necessary >>>>>> references into a controller and a view. You don't need to create >>>>>> a poll; >>>>>> try to run the application, test that view and see if you still >>>>>> get the same >>>>>> error, or a normal "poll not found" error. >>>>>> >>>>>> If you still get the same problem, zip the entire application and >>>>>> mail it to >>>>>> me. If not, then the problem is elsewhere... >>>>>> >>>>>> Alex >>>>>> >>>>>> >>>>>> >>>>>> On Aug 7, 2007, at 1:50 PM, Denis Jacquemin wrote: >>>>>> >>>>>> hi Alex, back from holiday... back into rails ;o) >>>>>> >>>>>> So, the app/models/civic_duty_poll.rb file exist, here is the >>>>>> content >>>>>> class CivicDutyPoll < ActiveRecord::Base >>>>>> >>>>>> # The poll model. >>>>>> >>>>>> acts_as_poll >>>>>> >>>>>> end >>>>>> >>>>>> The migration exist 002_create_polls.rb, here it is >>>>>> class CreatePolls < ActiveRecord::Migration >>>>>> def self.up >>>>>> create_table :civic_duty_polls do |t| >>>>>> t.column "name", :string >>>>>> t.column "question", :string >>>>>> t.column "answer", :string >>>>>> t.column "votes", :integer, :default => 0 >>>>>> end >>>>>> end >>>>>> >>>>>> def self.down >>>>>> drop_table :civic_duty_polls >>>>>> end >>>>>> end >>>>>> >>>>>> the rake db:migrate was ok the table is in the db. >>>>>> >>>>>> the 'doc' directory was removed by hand and I still get the error >>>>>> at the end >>>>>> of the create_poll.rb script >>>>>> >>>>>> c:/ruby/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/commands/ >>>>>> runner.rb:45: >>>>>> undefined >>>>>> local variable or method `acts_as_poll' for CivicDutyPoll:Class >>>>>> (NameError) >>>>>> >>>>>> Thanks for your help, >>>>>> Denis >>>>>> >>>>>> >>>>>> On 7/23/07, Alex Deva wrote: >>>>>>> Hi Denis, sorry about the delay. >>>>>>> >>>>>>> Obviously you have the acts_as_poll method, so the problem is >>>>>>> elsewhere. >>>>>>> >>>>>>> It's likely that the installation didn't go ok, since I've just >>>>>>> fixed >>>>>>> a strange generator bug (see my previous email in the list). In >>>>>>> that >>>>>>> case, please check that the following files exist: >>>>>>> >>>>>>> app/models/civic_duty_poll.rb >>>>>>> >>>>>>> and a migration in db/migrate, labeled "xxx_create_polls" >>>>>>> >>>>>>> Also, have you run rake db:migrate? Did that work? Do you >>>>>>> have the >>>>>>> civic_duty_polls table in your database? >>>>>>> >>>>>>> Please let me know! >>>>>>> >>>>>>> Thanks, >>>>>>> >>>>>>> alxx >>>>>>> _______________________________________________ >>>>>>> Nrr-general mailing list >>>>>>> Nrr-general at rubyforge.org >>>>>>> http://rubyforge.org/mailman/listinfo/nrr-general >>>>>>> >>>>>> >>>>>> >>>>>> >>>>>> >>>> >>>> >> >> -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/nrr-general/attachments/20070809/e69eed24/attachment-0001.html From oancea at gmail.com Wed Aug 15 12:37:53 2007 From: oancea at gmail.com (Aurelian Oancea) Date: Wed, 15 Aug 2007 19:37:53 +0300 Subject: [Nrr-general] Email enquiry for on Projects In-Reply-To: <20070815062412.86151.qmail@web1.chml.ro> References: <20070815062412.86151.qmail@web1.chml.ro> Message-ID: <514f44140708150937y7b1f1486i498e539412812501@mail.gmail.com> Salut Bogdan, Stiu de RailsDay, dar din pacate in perioada respectiva sunt plecat intr-o mica vacanta. Am pus in CC si mailul listei de discutie NRR, poate e cineva interesat. On 15 Aug 2007 06:24:12 -0000, bogdan.gaza wrote: > > Salut, > > Am vazut anuntul(pe blogul oficial de la rubyonrails) despre o competitie genul RailsDay. Se numeste RailsRumble 2007 se tine pe 8 si 9 Septembrie. Ar fi fain daca am face o echipa cu membrii NRR. > > Mai multe detalii aici: http://railsrumble.com/. > > Echipele sunt de maxim 4 participanti deci e destul loc. > > Astept raspunsul tau, > > Bogdan Gaza - aka hurrycane > > -- Aurelian Oancea Web: http://www.locknet.ro