Displaying 20 results from an estimated 500 matches similar to: "How do you create a tree strucutre with ActiveRecord"
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 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 May 06
3
Tip, may even be useful
Here''s something that caused me a couple of hours of head-scratching
today:
Apparently, if your model doesn''t derive from ActiveRecord, it is NOT
reloaded for each operation in the development environment.
I was working with something that uses a single model per session, and
stores its data in the session. I kept wondering why I didn''t see my
changes. Finally, I
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
2012 Aug 10
2
Regular Expressions + Matrices
Hi all,
My code looks like the following:
inname = read.csv("ID_error_checker.csv", as.is=TRUE)
outname = read.csv("output.csv", as.is=TRUE)
#My algorithm is the following:
#for line in inname
#if first string up to whitespace in row in inname$name = first string up
to whitespace in row + 1 in inname$name
#AND ID in inname$ID for the top row NOT EQUAL ID in inname$ID for the
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
2012 Nov 12
0
Adding Spatial Correlation Strucutre to Logistic Regression / Contingency Analysis
>From what I can tell by reading forum posts etc., this is not a trivial
issue. An answer in 2008 indicated some directions, but I'm curious whether
any developments have been made since then.
In my data set I have 182 observations with a binomial response, a 2-level
explanatory factor, and x and y coordinates. By visually inspecting the
spatial distribution of standardized residual error
2001 Dec 21
3
Wine config difficulties
I hope i am posting this to the right list.
Specs:
FreeBSD 4.x
Wine 20011108 -- FreeBSD ports version
Me == Newbie
I am trying to configure wine manually because the package i recieved does not include winesetup. I configured the drives to suit my setup and left the rest as the defaults.
When i try to start wine with "wine program.exe" i get this error:
2010 Mar 07
8
Parsing XML file with no style info with Hpricot
Hello,
I''ve been trying for hours to parse an XML using Hpricot. Usually it''s
not a problem. Here''s my simple code:
#This works and outputs the proper xml data
@url1 = ''http://www.sportingnews.com/stories/sportingnews/MLB/rss.xml''
@page1 = Hpricot(open(@url1))
<%= @page 1 %>
#This does not work, and I''m scratching my head
@url1 =
2001 Apr 17
4
Samba 2.2.0 - glossy press release :-).
In the interests of full disclosure, here's the glossy press
release (with html as well ! :-).
Jeremy.
---------------------------------------------------------------------
Samba 2.2.0 - Powering the next generation of Network Attached
--------------------------------------------------------------
Storage.
--------
17
2009 May 27
2
Having problems with Samba and openLDAP Groups
I'm getting a little closer and understanding how the logs, etc work. I
can log onto a Samba share, can read and write to my home directory, but
I'm concerned about trying to get the file share Staff to work - want it
to be read and write to the Group named Staff. I have set up the group
and added myself to the group
If I do a smbldap-groupshow Staff - I get
sudo smbldap-groupshow
2010 May 22
1
How to find all single minima, i.e. only each one within each next part of analyzed vector (table)
Dear R users,
How to find all single minima within each next part of analyzed vector (table)
Select all minima (mass_value=min & mass_value<2)
(many) in vector(table),
BUT first put mask on table in order to select
within one window mask (5 elements) only one local minimum, and next to search within
the next time window mask the second minimum (only one local along second mask)
2010 Mar 03
0
Using gsub to replace text with link from database
I''m really close to solving this that I can smell it. In a nutshell I''m
trying to create this:
http://www.baseball-reference.com/friv/link_players.cgi
I have an app that has a database of baseball players.
I''m trying to create a feature where you can copy and paste your blog
text, the feature will scan the text and return the text with the
proper html links of my app
2008 Aug 11
3
samba print server client job queues.
Hello,
I'm working on setting up a corporate print server with samba
3.2.0-2.17 on a Fedora 9 install. I've been able to get the services up
and running and added several printers via the cups interface, also
been able to upload the windows drivers. This all works well, printing
also works well.
The problem that I am running into is that the old print jobs
seem to be getting stored