similar to: Rails equivalent to System.out.println?

Displaying 20 results from an estimated 700 matches similar to: "Rails equivalent to System.out.println?"

2005 Jul 06
4
undefined method `stringify_keys!'
I have a Model whose table name and primary key don''t follow Rails conventions. So I have used set_table_name() and set_primary_key() and can do the Record.find() method ok. My problem is that the Record.new(params[:id]) idiom in a controller complains: undefined method `stringify_keys!'' for "REAL_PKEY":String Is there something else I need to do?
2005 Jul 03
3
link_to in controller
Is there a way to use the "link_to" function in a controller?
2006 Mar 14
3
ActiveRecord row-by-row processing
I want to use ActiveRecord outside of Rails to do processing on large tables. I want to be able to process the rows as they are retrieved rather than having to store the results in an intermediate array. Any suggestions? Looks like I could hack the adapter to provide an accessor to the underlying DBI handle. Anything cleaner than that?
2007 May 11
1
[Somewhat OT] Integrating RSpec and RCov results in Gem''s RDoc
I have a Gem on which the testing is done with RSpec. I would like to include the results of RSpec and the RCov html files in the RDoc. The problem is that when I have RDoc include the files, it winds up escaping all the html. Is there a way to get HTML into RDoc unprocessed? Or is there some other way I can distribute the RSpec/RCov results with my Gem integrated with RDoc? I can include
2006 Jun 14
7
CR issue
Hi, I am using RedCloth (3.0.4). First using online text2html (http://www.textism.com/tools/textile/) , "123 456" returns <p>123<br />456</p> But by code: <code> require ''RedCloth'' puts RedCloth.new("123\n456").to_html </code> I got: <p>123 456</p> CR is not taken in consideration. Is there any parameter I am
2005 Apr 27
1
Ruby Shipping
To accompany the Payment library (http://payment.rufy.com/), I have created the shipping library that connects APIs for various shippers like UPS and FedEx. It is available as a ruby gem: gem install shipping or from rubyforge http://rubyforge.org/projects/shipping There is going to be some data that will persist for all shipments. For example, you will not want to repeat the fedex account
2010 Aug 13
6
Equality of Vectors
Hello, Is there a way to get a single TRUE or FALSE statement from comparing two vectors? For example, c(1,2,3) == c(1,2,3) produces TRUE TRUE TRUE where I would like it to produce only TRUE for use in an if statement. Likewise, when two vectors are not exactly identical (in all elements) I would like a single FALSE result, as opposed to c(1,2,3) == c(1,2,5) TRUE TRUE FALSE Any ideas?
2005 Aug 17
7
Need help with the rubyonrails wiki - instiki filters
I am trying to do a tutorial improvement on the wiki but I am having some problems with the auto formatting. Using httdp.conf produces http://httpd.conf when filtered. Using *.so produces .so and bold text there after. Is there any shorthand for the user for making text appear as it should without the linking and re-writes? Or does the admin have to change the filters in Instiki? Tesla
2010 Jun 22
5
Displaying Iteration Count
Hello, I'm running a very long for loop that usually takes hours. For my own piece of mind, it would be nice if I could check periodically and see which iteration the loop is on. A line of code that told R to print the iteration number every 100 or 200 iterations would be perfect. Does anyone know something like this? I've never known how to print anything within a for loop before the
2004 Jan 27
2
rsync still hangs on cygwin 1.5.6-1 and 1.5.7
Hi, Rsync is still hanging under cygwin for me. I'm using rsync 2.6.0 and i've tried cygwin-1.5.6-1 as well as a snapshot of 1.5.7. I've noticed that some people are having success. I shouldn't have to do anything interesting in order to make this work, right? *********************************************************************** This message is intended only for the use of
2010 Apr 19
2
ecdf
Hello, I'd like to plot an empirical cumulative distribution function, except instead of the fraction of values < x, I'd like the fraction of values > x. I think this can be done using the ecdf function in {Hmisc}. I installed the package and loaded it. However, when following the example given in the documentation, I get an error: x <- rnorm(100) ecdf(x,what='1-F')
2006 Jun 05
3
possible bug in trunk base.rb? BREAK_RE.
Hello All, first post to the list. I just checked out trunk and it broke my tests. Turns out that the BREAK_RE regex found in base.rb is missing the "/m" mode modifier. I am still getting my head around the library so i may be missing something but was that done on purpose? Thanks. jeremy Index: base.rb =================================================================== --- base.rb
2011 Sep 23
4
'save' saved object names instead of objects
Hello, I created an array to hold the results of a series of simulations I'm running: d.eta <- array(0,dim=c(3,3,200)) <simulation goes here and populates the array but it's not important> Then I tried to save the results using this: save(d.eta,file="D:/Simulation Results/sim 9-23-11 deta") When I later tried to reload them using this: d.eta <-
2011 May 17
2
Minimum value by ID
Hello, I have a longitudinal dataset where each individual has a different number of entries. Thus, it is of the following structure: x <- runif(12) id.var <- factor(c(rep("D1",4),rep("D2",2),rep("D3",3),rep("D4",3))) dat <- as.data.frame(x) dat$id.var <- id.var dat > dat x id.var 1 0.9611269 D1 2 0.6738606 D1 3
2006 Jun 16
3
shortcut for full url as the linktext?
Is there a shortcut for this: "http://foo.com":http://foo.com ? Thanks, ---John
2010 Mar 11
1
VAR with contemporaneous effects
Hi, I would like to estimate a VAR of the form: Ay_t = By_t-1 + Cy_t-2 + ... + Dx_t + e_t Where A is a non-diagonal matrix of coefficients, B and C are matricies of coefficients and D is a matrix of coefficients for the exogenous variables. I don't think the package {vars} can do this because I want to include contemporaneous cross-variable impacts. So I want y1_t to affect y2_t and I
2005 Dec 12
9
Webrick is being stupid...no info on a brand new project
I created a project, made a migration, generated scaffolding...start up webrick and I get nothing. To simplify things, I just started another project and generated a controller, still getting nothing. The index page loads fine, but nothing beyond that. If I go to anything that should give me a 404, the page is just blank. The Webrick console just says a 500 (nothing explaining why), and
2005 Nov 16
4
RedCloth repository moved to SVN
I''ve been getting increasing resistance from helpers who prefer Subversion over CVS. I feel that it''s slowing down development. So, done. Mailing lists, releases, news will still be at Rubyforge. Bug tracking will likely move to the new repository soon as well. The new repository is at: http://code.whytheluckystiff.net/ Checkout RedCloth from
2008 Aug 25
1
Problems starting Rcmdr
I understand that Rcmdr needs the tcltk package in order to run. However, when I attempt to using the library (Rcmdr) command, I get the message below. I have attempted to start X in R as well as using starting it from the Utilities folder on my Mac to no avail. I can't figure out if there is an issue with X11 or with R itself (I just updated to 1Is there a terminal command I can use
2011 Jul 01
2
merge function
Hello, I'm clearly confused about the merge function. In the following r <- merge(x,y,all.x=T,all.y=F) my y vector has only unique values (no duplicates). So I don't understand how this can ever generate an r which is of greater length than x. I thought the default behavior was only matching rows are included, but that using all.x=T included rows with unmatched x's as well. If