[Rails] Re: rake migrate error: SQLexception

2011-05-03 Thread Kelly Pfaff
Michael Pavling wrote in post #996409: > Any chance that at line 6 of config/initializers/task_scheduler.rb you > access Users before the users table has been created? > > If so, what happens if you comment that line while you migrate to > create the table? You sir, saved my day. I should have lo

[Rails] rake migrate error: SQLexception

2011-05-03 Thread Kelly Pfaff
When i try to migrate my db, it gives the following error: ** Invoke db:migrate (first_time) ** Invoke environment (first_time) ** Execute environment rake aborted! SQLite3::SQLException: no such table: users: SELECT * FROM "users" D:/Irails/ruby/lib/ruby/gems/1.8/gems/activerecord-2.3.11/lib/activ

[Rails] Re: Re: Passing NULL when it shouldn't

2011-04-08 Thread Kelly Pfaff
No prob i found it via google, should be through :value: <%= hidden_field :comment, :created_by, :value => "number1" %> Everything working now, thanks much for the help! -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby

[Rails] Re: Passing NULL when it shouldn't

2011-04-08 Thread Kelly Pfaff
Thanks for the fast reply, i added your code: <%= form_tag :action => "comment", :id => @zwemmer, :created_on => Time.now %> <%= hidden_field :comment, :created_by, 'number1' %> <%= text_area "comment", "body" ,:size =>"25x10" %> <%= submit_tag "Merk op!" %> Now i am getting a TypeError 'can

[Rails] Re: Passing NULL when it shouldn't

2011-04-08 Thread Kelly Pfaff
In ZwemmersController: def comment Zwemmer.find(params[:id]).comments.create(params[:comment]) flash[:notice] = "Added new comment." redirect_to :action => "show", :id => params[:id] end -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscrib

[Rails] Passing NULL when it shouldn't

2011-04-07 Thread Kelly Pfaff
I'm having a problem passing along all parameters to post a comment: <%= form_tag :action => "comment", :id => @zwemmer, :created_on => Time.now, :created_by => "number1" %> <%= text_area "comment", "body" ,:size =>"25x10" %> <%= submit_tag "Merk op!" %> In the console i get: ←[4;36;1mCo

[Rails] Re: changing app version

2011-02-25 Thread Kelly Pfaff
Hmm, no rails folder in vendor... -- 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@googlegroups.com. To unsubscribe from this group, send ema

[Rails] changing app version

2011-02-25 Thread Kelly Pfaff
I'm having difficulties changing the version of rails my app uses. I changed the version in environment.rb from 2.0.2 to 3.0.3: RAILS_GEM_VERSION = '3.0.3' unless defined? RAILS_GEM_VERSION (3.0.3 is installed:>gem list |grep rails rails (3.0.3, 2.0.2)) 'rake rails:update' gives: rake aborted! ca

[Rails] authlogic problem

2011-02-21 Thread Kelly Pfaff
I can't get authlogic to work. (https://github.com/binarylogic/authlogic) i've installed it, i've put the following in environment.rb: config.gem "authlogic" 'gem list' gives: *** LOCAL GEMS *** abstract (1.0.0) actionmailer (3.0.3, 2.0.2) actionpack (3.0.3, 2.0.2) activemodel (3.0.3) activereco

[Rails] Re: link_to action going wrong.

2011-02-10 Thread Kelly Pfaff
Works perfectly, thank you very much. -- 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@googlegroups.com. To unsubscribe from this group, send

[Rails] link_to action going wrong.

2011-02-10 Thread Kelly Pfaff
Code is from the view. If a user clicks the 'Over' link, i want to update the :groep attribute of the zwemmer to 'blatest4'. But now, all the zwemmers :groep are changed when the page loads. How can i fix this? code: http://pastie.org/1548696 -- Posted via http://www.ruby-forum.com/. -- You rec

[Rails] Re: Re: Can't change instance variable

2011-02-07 Thread Kelly Pfaff
K thanks for the responses, i will do some reading on params. Didn't know changing the value of an instance variable is this complicated. -- 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

[Rails] Re: Can't change instance variable

2011-02-07 Thread Kelly Pfaff
Frederick Cheung wrote in post #980057: > > You haven't shown anywhere where you're trying to set it - if you want > it to be set based on a parameter, you're going to have to set @grp to > params[:something] > Hm, i forgot the on_click in my code: <%= link_to image_tag("oranje.png", :mouseover =

[Rails] Can't change instance variable

2011-02-07 Thread Kelly Pfaff
I have an instance variable @grp: (app\controllers\zwemmers_controller.rb) class ZwemmersController < ApplicationController ... def initialize @grp='or1r2r3r4gggrp' end attr_accessor :grp ... end When i click an image, i reload the main index page and try to change the value of the varia

[Rails] Re: Use text file to add test data

2011-02-06 Thread Kelly Pfaff
Kelly Pfaff wrote in post #979916: > Thanks for the speedy reply Fred. > I've relocated gg.txt to the right directory, and now a new error pops > up, as you have foreseen: > Undefined method 'process' ... > > What can i do to solve this? I made process

[Rails] Re: Use text file to add test data

2011-02-06 Thread Kelly Pfaff
Thanks for the speedy reply Fred. I've relocated gg.txt to the right directory, and now a new error pops up, as you have foreseen: Undefined method 'process' ... What can i do to solve this? -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to th

[Rails] Use text file to add test data

2011-02-06 Thread Kelly Pfaff
Hi, Im trying to make an application based on the 'depot' app from 'Agile web development with Rails'. Instead of putting the data in add_test_data.rb itself (p.89), I want to read it in from a txt file like this (gg.txt has a list of front and last names): class AddTestData < ActiveRecord::Migrat