Displaying 20 results from an estimated 5000 matches similar to: "AWDWR- Question"
2006 Jun 09
18
Is IRB the ruby console ?
I''m running script/console but keep getting the message that irb.bat is not
recognized as an internal or external command, operable program or batch
file.
If it means anything I am running instant rails. I can invoke irb straight
forward.
TIA
Stuart
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
2006 Jun 14
13
Undefined method
I really hope this is not a bad question (as in he''s abusing the
list). However I could use a little direction (even though I''m
reading books, tutorials)
Right now I''m getting a
undefined method `category'' for 4:Fixnum
The specific lines from the rhtml file are:
<td><%= link_to position.category_id.category, :action => "show", :id
=>
2006 Jun 13
2
Migration or model first
I sort of asked this the other day but with no replies. I''m new to rails
btw.
Question: Is there a preferred way to create migrations ? What I''ve noticed
is if I create a model first , it sets up the skelton of the migration.
If I create a migration file and then do the model it attempt to create a
migration file and not overide the one already in place. It seems to make
sense
2006 Jun 08
19
Agile Web Dev (book) question: errors
This is kind of frustrating (but no doubt helpful in the long run) that
after following along and coding , and d/l the code the same error is
appearing.
For those who are familiar with the depot app, I''ve run into a problem after
fixing the cart to reflect quanitites. I worked through the intended error
messages but now have this appearing:
SyntaxError in StoreController#add_to_cart
2007 Aug 21
4
[AWDwR] Confused about has_one and has_many
Heya everyone!
I am quite new to Rails and I am reading AWDwR. I am at Task E "Check
Out!". I understand it quite well, but I have a problem with the last
playground exercise: Add a Table which contains the payment types.
All goes well, but I am not sure whether I should use has_many or
has_one(as in the Playground wiki at
http://wiki.pragprog.com/cgi-bin/wiki.cgi/PT-E-3).
I use the
2006 Jun 14
13
A good tutorial
Are there any other tutorial than "Agile Web Development with Rails"
that you can suggest? So far I can''t say that RoR has been easy to
learn. :-)
--
Posted via http://www.ruby-forum.com/.
2006 Jun 20
8
Integrating multiple applications
I''ve got a couple apps that I use (billing app, support ticket app,
some other custom apps) that I want to integrate into one site. They
will all use the same layout for the most part, and will link between
each other.
When I initially thought of doing this, I figured if I put the apps at
different roots - /billing /support etc - then the links wouldn''t work
at all, because
2006 Jun 13
11
Question: Migration - multiple creates
I want to create a migration file that creates multiple tables, so i''m
guessing the correct format would be:
Can anyone confirm ? I''m guessing that each new create script requires a
seperate class so formatted this way. Perhaps I''m wrong.
TIA
Stuart
class CreateTable1 < ActiveRecord::Migration
def self.up
create_table :table1s do |t|
t.column :length,
2006 Aug 07
8
Login form question
I''m using Rails Recipes to create a login form but instead of username
and password, my setup is firstname, lastname, password.
I seemed to be gramatically challenged and not sure how to set up the
parameter list. Can anyone offer up a suggestion.
The book shows the method starting like:
if request.post?
user = User.find(:first, :conditions => [''username = ?'' ,
2006 Aug 08
11
Newb question- method not working
I know this shouldn''t be in the view but to test the code it is.
Anyway if I do just session[user] I get back the user id (the id from
the user table)
which is good.
However this code does not work.
<% a = session[:user] %>
<% uname = User.find(:first, :conditions => id = a) %>
<%= @uname %>
TIA
Stuart
2006 Jun 17
4
Simple tutorial weirdness
Sorry - working on a simple tutorial but something is throwing me
here. I''m supposed to get a Time.now() print to the page but it''s not
working and I can''t figure out why.
No errors are thrown my the page shows:
Howdy, world! My name is Stuart Felenstein.
This was verified at .
So no time stamp showing. I went into IRB , did a Time.now() and it''s
working
2006 Jun 23
16
Help please-draggable
I asked the other day about this problem but haven''t received a response.
Trying again:
I just downloaded 1.6 and can''t get a simple draggable to work, which
is weird. I know it''s not my browser since the demos are working.
Here is my simple code. I''ve also had the "new Draggable" between
the select tags. Didn''t change anything.
2006 Nov 13
9
Setting up Mongrel and Apache , some direction needed
I have a site that is PHP on Apache / RedHat , but will send requests to a
subdomain (running Rails) for database operations.
I believe the set up should be to have ROR using Mongrel, and an Apache
virtual host passing requests from apache to mongrel.
Does this sound correct ?
I believe the Virtual Host is set up in Apache.
One of my problems is I can''t find the httpd.conf file for
2006 Jun 12
3
Syntax errors on "insert into"
I''m digging around and googling but can''t seem to find what I think is a
simple thing. All I''m trying to do is insert data in a migration into a
table, using regular SQL statements.
LIke this:
class AddStateData < ActiveRecord::Migration
def self.up
INSERT INTO states values ('''',''Alaska'');
INSERT INTO states values
2006 Jun 20
22
New e-book - The Money Train
While talking about my RailsConf presentation with Ben Wiseley, he
suggested writing a book on the same topic... so I did! The Money
Train is an e-book about building e-commerce sites using Ruby on Rails.
Read my blog entry about it at http://www.bencurtis.com/archives/
2006/06/rails-e-commerce-e-book/ or head to http://
www.agilewebdevelopment.com/book to dive right in.
As always, a big
2006 Jul 16
3
OT: Radrails
Sorry, but I have tried signing up for the RadRails list and never can
get a confirmation email. I think it may not exist.
Anyway, I created a project using just cli, now I''m trying to import
the project with no success. I choose the directory and radrails just
sits there not enabling the okay button
Sound familiar ? Maybe I''m doing something wrong.
Stuart
2006 May 23
2
RFC - Ruby on Rails / jEdit (Blog Posting)
All,
Request for Comments. I''ve attempted to collect and clarify a few
things in the spirit of documenting things. To that end I''ve worked
on a blog posting starting from scratch for a windows box and getting
Ruby, Rails, and (my new favorite editor jEdit) install. Probably
nothing new, just a consolodation of information....
# Prerequisites
# Install Ruby
# Install Rails
#
2006 Aug 02
2
Help please: AWDWR -- Migration failure
I''m having a problem with one of the migration files from the depot application.
** Invoke db:migrate (first_time)
** Invoke environment (first_time)
** Execute environment
** Execute db:migrate
== AddPrice: migrating ========================================================
-- add_column(:products, :price, :decimal, {:scale=>2, :default=>0, :precision=>
8})
rake aborted!
You
2006 Aug 04
5
Any opinions on the Rails [Rough Cuts] books from Safari
Either -
Ruby on Rails: Up and Running or
Rails Cookbook
I''ve heard so many negative things about Safari pdf''s and the whole
program I''d like to get some feedback.
I have AWDWR(2nd edition), RubyforRails(Manning), Programming Ruby(2nd
edition), so I''m not even sure I actually need another book but maybe
the approach or content is somewhat uniuqe.
TIA
Stuart
2006 Aug 04
1
Need a better undersanding of form helpers
perhaps someone can take a little time to give me a better
understanding of how to use form helpers.
Here is what I''m working with in my app:
user model - (the table where a user registers their information)
it contains the following fields -
first_name
last_name
email
account_type (currently set to string but will probably be a select
box with options)
password_salt (I''m