Displaying 20 results from an estimated 2000 matches similar to: "Editing the migration template"
2008 Feb 13
4
Migration Issues: Can't update newly added column values
Hello everyone, just wondering if anyone can help me with a migrations
question here.
Using:
rails 2.0.2
ruby 1.8.6 (2007-09-24 patchlevel 111) [i386-mswin]
mysql 5.0.45
Platform:
windows xp
The problem:
----------
I created a migration that is designed to add a column named
"deleted_at" (timestamp) and then remove a column named
"is_deleted" (boolean). The idea is to
2006 Apr 03
18
newbie generate scaffold
Hi Guys
First time on the list and pretty new to the rails way of doing
things, yup I know sorry.. another newbie!
anyway, apologies out of the way, this is the problem I am having...
I have purchased the "Agile Development with Rails" book and have
just started running through the ''Depot'' demo application.
I have got to page 57...
I have my project files all
2005 Mar 05
3
login generator problem
I am trying to use the login generator, but I keep
getting the following error when I run "generate login
Account":
/usr/lib/ruby/gems/1.8/gems/rails-0.10.0/lib/rails_generator/base.rb:84:in
`manifest'': No manifest for ''login'' generator.
(NotImplementedError)
from (eval):3:in `__send__''
from (eval):3:in `manifest''
from
2006 May 19
1
FileColumn
I''m using Windows and Postgres 8.
I installed RMagic gem thingy and FileColumn plugin ok.
I followed instructions exactly as directed on FileColumn web site which
is very straight forward:
---model
class My_model < ActiveRecord::Base
file_column :column_for_file_name
end
-----view -upload form--set to mulitpart
<%= file_column_field "my_model",
2006 Mar 23
1
Need installation Help
Im running windows 98.
I followed the steps provided by Curt to install ruby.
when typing gem install rails --remote
I got bad command or file name.
I then proceeded to change all .cmd file to .bat file with rename *.cmd
*.bat
I updated ruby gems from 8.3 to 8.11.
I then typed gem install rails --remote, and it worked.
I now try rails -v at the command prompt and it says bad command or file
2006 Apr 13
2
running rails on Linux
I''ve done local installs of ruby-1.8.4, then rubygems-0.8.11, then:
% gem install rails
I get rails and its dependencies all going into:
/local/pkgs/ruby-1.8.4/lib/ruby/gems/1.8
i.e.
/local/pkgs/ruby-1.8.4/lib/ruby/gems/1.8/gems/rails-1.1.2
In the rails directory I see:
/local/pkgs/ruby-1.8.4/lib/ruby/gems/1.8/gems/rails-1.1.2/bin/rails
which I presume is what is executed when
2005 Apr 24
2
Model names in controllers
Please excuse yet another newbie question...
I''m getting this error:
MissingSourceFile in <controller not set>#<action not set>
c:/program files/ruby/lib/ruby/gems/1.8/gems/actionpack-1.8.1/lib/action_controller/dependencies.rb:75:in `require_dependencies'': Missing model MyModel.rb
From these lines of code:
class MyModelController < ApplicationController
2012 Jun 06
1
why to get the error 'undefined method `write_inheritable_attribute''
I started getting this error message when I attempt to do some rake
tasks:
$ rails destroy scaffold genotypes
/usr/share/rails-ruby1.8/railties/lib/rails_generator/options.rb:32:in
`default_options'': undefined method `write_inheritable_attribute'' for
Rails::Generator::Base:Class (NoMethodError)
from
/usr/share/rails-ruby1.8/railties/lib/rails_generator/base.rb:90:in
2006 Apr 04
6
connecting to mysql on OS X 10.4
i have looked in the archives, i have the _agile_ book, and its links
right in front of me, and i have done pretty much everything i can
think to do except start from a fresh OS install, and yet i still can
not get Rails to talk to MySQL.
when i try to do this:
237:/Library/WebServer/Documents/Rails/depot chris$ ruby script/
generate scaffold Product Admin
i get this output:
2012 Jul 27
7
Getting error while starting server plz help
c:/Ruby193/lib/ruby/gems/1.9.1/gems/rails-2.3.14/lib/rails_generator/options.rb:32:in
`default_options'': undefi
ned method `write_inheritable_attribute'' for
Rails::Generator::Base:Class (NoMethodError)
from
c:/Ruby193/lib/ruby/gems/1.9.1/gems/rails-2.3.14/lib/rails_generator/base.rb:90:in
`<class:Base>''
from
2008 Oct 24
2
Rails problem
What wrong?
# gem install rails -s http://gems.rubyonrails.org -v 2.2.0
Successfully installed activesupport-2.2.0
Successfully installed activerecord-2.2.0
Successfully installed actionpack-2.2.0
Successfully installed actionmailer-2.2.0
Successfully installed activeresource-2.2.0
Successfully installed rails-2.2.0
6 gems installed
Installing ri documentation for activesupport-2.2.0...
2007 May 22
5
rails edge
hi,
first time trying rspec, and rails edge. Are there any known issues
running rspec with rails edge?
for one, apparently script/generate scaffold_resource has been
renamed just "resource". Do I just search/replace "scaffold_resource"
with "resource" in file rspec_resource_generator.rb ? Somethings
still missing.
before i get "Couldn''t find
2006 Jun 28
5
rails destroys rdoc...again
for many versions of ruby, and as many versions of rails, ive been unable to generate docs without deleting this file:
lib/rails_generator/generators/components/controller/templates/controller.rb
ruby just chews more and more memory until swap fils up and the system has to be reset..
m gems # rdoc --version
RDoc V1.0.1 - 20041108
ruby --version
ruby 1.8.5 (2006-06-22) [x86_64-linux]
2006 Jan 05
7
repost - Can one edit the file that generates the scaffolding.css?
I am reposting this because not only am I VERY interested in the
answer but because I think it would also be useful to many, many people.
We kind of have a house-style here, so it would be nice if the
generated scaffold.css would accommodate that. My questions are?
Is it possible?
Is it safe?
How?
bruce
2007 May 21
7
How do I stop a column being updated by model.save?
One of my models has a column that is updated very frequently from a
separate process, so it is important that when a record is saved in
rails, this column should be left alone. In the update method of the
controller I have:
@record = MyModel.find(params[:id])
@record.update_attributes(params[:my_model])
params[:my_model] doesn''t have a reference to the column I''m talking
2005 Apr 10
2
residuals in VGAM
Hi all:
I want to fit a multinomial logit model with VGAM package, however I cannot find a way to check the residuals since
residuals(my_model) and resid(my_model)
does not work.
Any suggestions?
Thanks in advance.
Alex Brito
[[alternative HTML version deleted]]
2011 Jul 04
2
ruby and rails wont work even they're already installed
mongskie@mongskie-os:~$ gem
/usr/bin/gem:4: undefined method `manage_gems'' for Gem:Module
(NoMethodError)
mongskie@mongskie-os:~$ rails
/usr/lib/ruby/1.8/active_support/dependencies.rb:55: uninitialized
constant ActiveSupport::Dependencies::Mutex (NameError)
from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:36:in
`gem_original_require''
from
2006 May 08
7
How to get difference between two dates in days???
Hi,
I want to calculate difference between Current date & previous date
(stored in database). The difference should be in days. Hhow to do
that??
PLs tell me.
Thanx in advance.
Prash
--
Posted via http://www.ruby-forum.com/.
2013 Mar 14
7
No Migration Files are created
I''ve been working with Rails for 3 Months now, but haven''t experienced
this problem until now. I''m currently working through Micharl Hartls
Tutorial and everything worked fine so far, but suddenly (chapter 11) I
can nolonger create Migration Files.
when entering "rails g model Name field1:type" I don''t get the usual
"create db/migrate...."
2006 Mar 05
1
rdoc on edge rail fails at generator template
Infinite loop at a generator template :-
controller.rb: c
railties/lib/rails_generator/generators/components/controller/templates/controll
er.rb:3:15: Expected class name or ''<<''. Got RubyToken::TkLT: "<"
And BTW why are templates named .rb ?
Thanks
--
Posted via http://www.ruby-forum.com/.