Displaying 20 results from an estimated 5000 matches similar to: "New to rails"
2006 Jun 06
15
error working through Agile !!!
Hi everyone,
I''m working my way thru the ''Depot'' project from Agile Web Development
with Rails.
I got to the bit where I type:
ruby script/generate scaffold Product admin
And I get the following error:
error Before updating scaffolding from new DB schema, try creating a
table for your model (Product) ( on the last line ! )
Now I have followed everything as
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
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 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 Jun 10
3
Agile Web Development p.89
I''ve been following along just fine with the depot app, up until I make
the catalog, where, when the price is displayed with formatting, the
price shows up underneath the <div> bar for the next item in the
catalog.
If, in index.rhtml, I change the <span class="price"> to just <span>, or
equivalently, remove the entire <span...> tag, it works just
2006 Jun 08
21
"Rails recipes" vs "Rails cookbook"
Reviews Wanted.
I''ve read the tables of contents and haven''t yet made up my mind.
Is one book clearly better than the other? Is one clearly full of bugs? Is one so much
further ahead that there is no choice? Are they both so incomplete that I should just
wait and only cook real food? Do trains still have dining cars?
Warren Fred
-------------- next part --------------
An
2016 Sep 07
2
Receiving LLVM Error in Custom Backend
Hi,
I am receiving an LLVM Error from a custom 16-bit backend I am creating. I
am having trouble understanding the error/problem and how to go about
solving it. The error is:
LLVM ERROR: Cannot select: t29: i32,ch = load<LD2[%x.addr], anyext from
i16> t14, FrameIndex:i16<0>, undef:i16
t7: i16 = FrameIndex<0>
t9: i16 = undef
In function: mul_add
Can anyone provide any
2006 Feb 19
3
Rails urls & the AWD book
Greetings!
I''m having a hard time understanding the way Rails handles urls. I''m specifically having real trouble with the image_urls in the Depot app in the Agile Web Development book.
If I enter "\image\file.png" in the Add Product page, the image is displayed in the other views and Properties shows http://localhost:3000/images/file.png
If I leave off the leading
2006 Jun 07
4
Question: coding protected methods
Apologies first, because I need to ramp up on Ruby and coding Ruby in Rails,
however it''s my 3rd day with this beast :) so I''m asking :
When I added protected methods to the model before it was like:
protected
method....................
end
Would this be a valid way to write a protected method as well ?:
attr_protected :column1, :column2
Perhaps this particular call
2006 Jul 16
17
AWDWR question
In an early section on Action View, showing code being put directly
into the rhtml file:
<% require ''date''
DAY_NAMES = %w{ Sunday Monday Tuesday Wednesday Thursday Friday Saturday }
today = Date.today %>
<h1>Hello, Dave</h1>
<p>
It''s <%= DAY_NAMES[today.wday] %>.
Tomorrow is <%= DAY_NAMES[(today + 1).wday %>.
</p>
I get this
2006 Jun 21
12
Question{maybe silly] Sanity check
This maybe a silly question and the fact that I need a sanity check
might even be weirder, but I''m trying to set realistic expectations
for myself.
I''ve been reading reading reading AWDWR, Ruby on Rails, some of the
PickAxe, and even done a few recipes from Rails Recipes. This is all
of two weeks. I feel that I''ve learned a considerable amount but
going through the
2006 Aug 04
8
Demo in rails2.pdf of add_price migration, PostgreSQL 8.1.4
People,
I''m looking at the migrate example on p 74 of the rails2.pdf
It''s a simple example of using a migration to add a column to
the products table.
Here is a copy of the migration file named 002_add_price.rb
after I generated and then edited it:
class AddPrice < ActiveRecord::Migration
def self.up
add_column :products, :price, :decimal, :precision => 8, :scale
2011 Oct 20
2
Agile book apache2.conf: Forbidden You don't have permission to access / on this server.
Appreciate any help -
I am working through Agile web development (4.0) and am stuck on the
deployment using phusion passenger. I get this:
"Forbidden
You don''t have permission to access / on this server."
when I put depot.yourhost.com in the browser.
I have been through various web searches and for file permissions and
suggestions to change the <Files> container.
2007 Nov 25
15
Possible Problem with RSpec and
Sorry to be such a pest but I am trying to learn Ruby, Rails and RSpec all
at one go and it is a bit overwhelming. I have previously completed the
depot tutorial in the Agile Web Dev with rails book and now I am trying do
do it again using RSpec.
What I would like to know now is why I am getting a rake failure error at
the end of every spec:models run. Is this the expected behaviour when a
test
2006 May 06
4
Scaffold Uses Wrong Host for MySQL user
I''m following the example Depot app in Agile Web Development with Rails.
The scaffold fails because it is not using the correct host for the
user. Here is the error that the scaffold emits:
Access denied for user ''jimmy''@''%'' to database ''depot_development''
The MySql user ''jimmy'' was created with the host of
2007 Jun 11
2
Testing create in Rails controller
Hi All
So I am a first-time caller ;-) ... and have been trying to apply
RSpec to the depot example in Dave Thomas'' book as I build the
application.
I am having a problem testing the admin controller create method and
cannot quite see where I am going wrong so was hoping for a pointer :-)
My spec looks like:
describe AdminController do
before(:each) do
@product =
2012 Apr 13
1
FW: upgrade issue
Fixed the network issue by removing the net udev rule, somehow that was
causing the network no to come up. Disabled iscsid since it's not needed and
added did echo 0 > /proc/sys/kernel/hung_task_timeout_secs to fix the
megaraid issue.
-----Original Message-----
From: centos-bounces at centos.org [mailto:centos-bounces at centos.org] On Behalf
Of Paul A
Sent: Friday, April 13, 2012 3:41 PM
2006 Aug 16
6
Newbie-Question
Hi.
I''ve just started using Ruby on Rails.
Now I''ve got my first problem.
I generated a new migration ''add_price'' and get the message:
2006 Mar 30
3
simple migration problem
Hi:
I''m running RoR 1.1
I''m going through the Agile book Depot example and I want to generate my
next migration file so i''m typing
./script/generate migration depot
I was sort of expecting to get the file 002_depot.rb .. instead i''m
being informed that there already exists a migration named depot..and no
new file is generated..
should I be using a new
2006 Aug 06
4
Can''t run rails
Yesterday, I was having a problem with db:migrate. I was told my version
of rails was too old, and I needed to install it from gems instead of
the version in my version of Ubuntu. Since then, I''ve done that, and I
built ruby 1.8.4 from source and installed it. The installation was to
/usr/local/bin. As my distribution had put ruby 1.8.3 in /usr/bin, I
renamed that and put a link to