Displaying 20 results from an estimated 2000 matches similar to: "Tip, may even be useful"
2006 May 16
5
rake aborted when adding a column
I''m having a silly little problem with migrations. All I''m
trying to do is to add an SSN column to my Employees table. I
generated a migration which looks like:
class AddSsn <
ActiveRecord::Migration
def self.up
add_column :employees,
:ssn,
:string
end
def self.down
remove_column :employees,
:ssn
end
end
When I run this, however, I get:
>rake
2006 Jan 16
23
Read data from Excel
A client of mine has a ton of data stored in Excel spreadsheets. I''m
building a web application for her (backed by a real db of course) and want
to import all that data. Is there a library available to read data from
Excel? Is there an easy way to upload the spreadsheets and then read the
data?
Thanks,
Ken Kousen
--
Kenneth A. Kousen, Ph.D.
President
Kousen IT, Inc.
2006 Feb 02
2
Installation behind a proxy
Hi all,
I was a client site today on another project and we started talking about
RoR. I wanted to show it in action, so I downloaded the one-click Ruby
installer for Windows and then tried to do "gem install Rails
-include-dependencies". After a time-out period I received the following
error:
ERROR: While executing gem.(Gem::RemoteSourceException)
Error fetching remote gem
2006 May 04
11
Interesting ActiveRecord vs Hibernate article
For those haven''t seen it yet, Patrick Peak has an interesting
article at the Server Side (www.theserverside.com)
discussing the differences between the Hibernate (www.hibernate.org) peristence
framework and ActiveRecord. The article can be found here: http://www.theserverside.com/articles/article.tss?l=RailsHibernate .
Patrick Peak is the author of _Hibernate Quickly_ (Manning), which
2006 Jan 12
4
How do you create a tree strucutre with ActiveRecord
I want to build an application that has the concept of administrative
domains. What I mean by this is that administrators have access to
different data, based on what domains they are a member of. The domain
strucutre is hierarchical. Here is an example:
- MLB
- AL
- East
- Yankees
- Red Sox
...
+ Central
+ West
- NL
+ East
+ Central
+ West
Now
2006 Jan 04
14
Rails on Tomcat or JBoss?
Hi all,
The Rails book talks about running Rails under Apache, but is there a
(relatively) easy way to deploy it to either Tomcat or JBoss? Is the CGI
servlet the only option?
Thanks,
Ken
--
Kenneth A. Kousen, Ph.D.
President
Kousen IT, Inc.
<http://www.kousenit.com> http://www.kousenit.com
<mailto:ken.kousen@kousenit.com> ken.kousen@kousenit.com
2006 Feb 10
15
"Ruby for Rails" in early access release
Hi --
My book "Ruby for Rails" is now being released one chapter at a time
through the Manning Early Access Program, with the whole book
due to appear on May 1.
If you''re interested, see http://www.manning.com/books/black
(I guess I could have just sent my sig with no body, but anyway :-)
David
--
David A. Black (dblack@wobblini.net)
Ruby Power and Light
2006 Feb 12
9
CSS in Views
How can I link to a CSS file in one of my view files?
--
Posted via http://www.ruby-forum.com/.
2006 Mar 27
3
XML Storage?
Hey Folks,
Now that all the fun and games of learning Rails has almost sunk
in it''s time to build something useful. I am tasked with building a
system to control and search our large (and I mean large 1.5 million + and
growing) photograph collection. I have been building databases for years
and after thinking about the situation we decided that trying to store the
2006 Jul 24
1
Newbie error: undefined local variable or method
When I add an item to the shopping cart, I get an error:
undefined local variable or method `cart_item'' for
#<#<Class:0x3715a78>:0x3715a48>
Session info says the cart being updated properly. I''m just not able
to output two variables:
<%= cart_item.quantity %> × <%= h(cart_item.title) %>
I did some research, and I can grasp that local
2006 Aug 04
6
Errors ... errors and errors.
I bought the second edition of the ruby on rails, it seems to work fine
now, did some adjustments to the code. But now I get a second error and
I want to learn to understand to fix them myself. So here is the error.
ArgumentError in StoreController#add_to_cart
wrong number of arguments (1 for 0)
#{RAILS_ROOT}/app/models/cart.rb:15:in `initialize''
#{RAILS_ROOT}/app/models/cart.rb:15:in
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 Mar 22
14
currency conversion webservice in a rails app?
Hi,
I''m interested in using a currency conversion web service in my rails
app. Does anyone have a free service that they use and like? I found
this one
http://www.webservicex.net/WS/WSDetails.aspx?CATID=2&WSID=10
I''ve tried to make a simple, plain Ruby script to connect to this and
get a conversion rate without success.
How do I integrate a webservice into my rails app? I
2006 May 02
96
[ADV] Second Edition of Agile Web Development with Rails
ANNOUNCING AGILE WEB DEVELOPMENT WITH RAILS, SECOND EDITION
===========================================================
http://www.pragmaticprogrammer.com/titles/rails2/
Rails has changed a lot since we announced the first edition of the
book a year ago. DHH says that the 1.1 release "boasts more than 500
fixes, tweaks, and features from more than 100 contributors." Who
are we to
2006 Jun 26
5
Newbie question about Agile Rails book - Delete from cart
I have been working through the Agile Web Development with Rails book
doing the Depot tutorial. I have completed it and it works but I cant
say I understand how and why.
My question is this "After adding products to the Cart, how do I then
give users the option to delete just one item and not empty the whole
cart?"
I''ve been playing around with all sorts of code, just making
2006 Jul 18
15
Agile Web Developement with Rails
I recently got a copy of the second addition in PDF
and got stuck on the Ajax portion using highlighting
page 128. While trying to make my cart flash I got an
RJS error when I click add to cart. I have gone back
and made sure my code matched what was in the book but
no help. I sent Dave an email and he rec''d this list.
Anybody got any good links for troubleshooting Ajax or
maybe have see
2006 Feb 26
0
Review of Black, Ruby for Rails, Chapter 4
As others have mentioned, Chapter 4 of David A. Black''s book _Ruby for
Rails_ is now available for download from the Manning site. The fact that
the book is being released one chapter at a time makes it easy to read in
small, digestible chunks. I never intended to review every chapter
individually here, but now that I''ve done the first three, I feel like I
ought to continue.
2006 Feb 20
0
Review of Ruby For Rails Chapter 3
Here''s my review of Chapter 3:
As the author says, this is a transitional chapter. The first chapter was
an introduction to Ruby, and the second was a similar introduction to Rails.
Now we begin the real purpose of the book, which is to dig into the Ruby
behind the Rails.
Periodically the question arises on this list about how much Ruby you need
to know in order to do Rails.
2007 Oct 15
4
ArgumentError in StoreController#add_to_cart: wrong number of arguments (1 for 0)
I am really new to Ruby and Rails but as you probably see I am trying
to get the shopping card working from the book. I am getting this
error but I really don''t know what to do. I have looked up several of
topics that stated the same problem but as far as I am, nothing has
helped me out yet. Is there something wrong with the Product model?
This is in the StoreController and I believe it
2006 Jul 10
2
cross controller functional tests?
Hi,
I have an online store and I would like to simulate a complete
shopping trip which involves several controllers? How can I write a
test that calls actions from different controllers in a particular
sequence? Something like the following which involves department,
product, cart_item, and cart controllers.
get department 5
check it has a link to product 4
get product 4
post cartitem/create
get