Displaying 20 results from an estimated 500 matches similar to: "Efficiently convert this SQL statement to ActiveRecord loop"
2006 Mar 16
6
File Auditing with rails - File I/O issue
Hey Folks,
I''ve written a script to generate a list of all files on a machine,
then zip the results. ?I''m going to stick a web front end on it, and use it to audit some file servers. The problem is that the ZIP compression/decompression isn''t working,
but its not what you might think. ?The script completes, but seems to
not actually write anything.
Here is a short
2006 Mar 17
7
OT: Subversion folder cleanup
How do you clean up your app folder to place onto the server? I want to
get rid of all the .svn stuff.
Seth Buntin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060317/cc81d9f7/attachment.html
2006 Mar 17
1
Re: Rails SQL Server adapter
Hey Ryan,
I asked this question awhile back, but any support planned for table
returning functions, or stored procedures?
I''m envisioning basically a mutable model class where you have 1 or more
instance variables defined (with default values) that are used in the
SQL queries as input parameters. When you instantiate the class you can
specifically define these parameters or use the
2006 Feb 24
18
I need more bling!
Hello everyone,
I just showed a friend a prototype of a site offering a service I''m
trying to sell (sorry, not on the Internet yet - he saw it at my
house).
His comment: "Looks like it does everything, but also looks pretty
ugly. You''re not going to wow anybody with that". Sitting back and
thinking about it, he''s dead right - it needs some bling to make it
2006 Apr 04
1
Parsing a SQL file directly into activerecord::execute method
Hello folks,
I''m trying to do something like:
1. db = ActiveRecord::Base.establish_connection(:adapter => "mysql",
:database => "app_development", :username => "root")
2. Cmd = File.read(''commands.sql'') <--- Command.sql contains multiple
valid SQL statement. I''ve tested this directly by piping it into MySQL
from the
2019 Aug 04
1
iconv: embedded nulls when converting to UTF-16
R-devel community:
I have encountered some unexpected behavior using iconv, which may be the source of errors I am getting when connecting to a UTF-16 -encoded SQL Server database. A simple example is below.
When researching this problem, I found r-devel reports of the same problem in threads from June 2010 and February, 2016, and that bug #16738 was posted to Bugzilla as a result. However, I
2006 Apr 04
0
Parsing a SQL file directly intoactiverecord::executemethod - Not a vamp I swear
It doesn''t like SET commands, or #Comments, etc. Looks like no way =
around this without using forgoing active record. I don''t really want =
to do that at this point.
---------------------------
Brian Corrigan
---------------------------
-----Original Message-----
From: rails-bounces@lists.rubyonrails.org =
[mailto:rails-bounces@lists.rubyonrails.org] On Behalf Of Brian
2006 Apr 04
0
New Rails Group - Albany, NY Area
Hello folks,
We have started a new rails community in the Albany, Schenectady, Troy,
Saratoga (Tech Valley) are of NY. For now, we have a little listserve
up and running. To join, go to www.techvalleyonrails.com
Best,
Brian
---------------------------
Brian Corrigan
---------------------------
2006 Jun 15
8
Markaby Installation Issues
Ok,
So I followed the directions.. I did a ''gem install markaby'' (which sounds
like its enough to get me going for rails), but I wasn''t sure, so I tried to
install the plugin as well.
Plugin installation fails looking for a file:
Script/plugin install http://code.whytheluckystiff.net/svn/markaby/trunk
Outputs this error:
+ ./trunk/svnindex.xsl
2006 Mar 28
2
ADODB and SQLServer
Hey Guys,
I''m absolutely stumped by this error. I haven''t seen it during any of my
development, or working in production until just this week.
Randomly, rails app becomes totally inaccessible until I restart the
webserver. I tossed in some custom error messages stuff, so I could get
the client to send me mail when it broke, and this is the error I''m
getting:
2006 Apr 04
0
Parsing a SQL file directly into activerecord::executemethod - Not a vamp I swear
In an effort to not be a vamp. (Thanks Amy) Here is the error message =
I''m getting.
Mysql::Error: #42000You have an error in your SQL syntax; check the =
manual that corresponds to your MySQL server version for the right =
syntax to use near ''=A1=C9=A8[=A9=B4#Globals =
(ActiveRecord::StatementInvalid) SET @rightnow =3D current_timestamp;
It appears that Active Record is
2013 Sep 16
3
b
Estimado José, por lo que estuve mirando aqui
https://en.wikipedia.org/wiki/Wilcoxon_signed-rank_test, en ?wilcox.test
y en libros de papel ... los datos deben cumplir ciertas condiciones,
quiza la mas restrictiva es que sean pareados ... si no lo son, quiza
esta variante del test es mas apropiada:
https://en.wikipedia.org/wiki/Mann-Whitney-Wilcoxon_test
la que en R se aplica usando el mismo
2006 Mar 08
2
Displaying related tables in forms.. probably an easy question!
Hey All,
I have two tables.. One belongs to another. Why can''t I reference
table1.table2.attribute?
Specifically, using scaffolding:
property.rb -
has_one :PropertyType
property_type.rb -
has_many :Properties
property_controller -
def list
@property_pages, @properties = paginate :properties, :per_page => 10
end
list.html:
1. <% for property in @properties %>
2.
2006 Mar 14
5
Controller Naming Question
Is it possible to have controllers named the following?
/admin
/admin/user
If not, is there some way to get it to work with routes?
I want to have some actions at the url /admin/<action> and some at
/admin/user/<action> (obviously in admin/user controller).
Thanks!!!
2007 May 06
1
simple table ordering question
Hi all,
I'm sure this is simple but I don't get it.
I have a table
mytable<-c(rep("Disagree",37),rep("Agree",64))
table(mytable)
this gives me
Agree Disagree
64 37
but I didn't ask for it to be in alphabetic order.
How can I get it in original order?
Disagree Agree
37 64
Thanks,
Jeff
Jeffrey. M. Miller, PhD
2006 Mar 20
1
I need some help with OptionsParser
Hey all,
I must be doing something wrong here. Im calling the following file this way:
ruby script.rb -s 1234
or
ruby script.rb -s1111
#Code snip
require ''optparse''
opts = OptionParser.new
opts.on("-s", "--size VAL", Integer) do |val|
puts "-s #{val}"
puts val
end
But..no matter what I do, I don''t get any values out. I must be doing
2006 Mar 23
2
Slow database imports with active record
Hey Folks,
Im looking for some suggestions here. Each day I need to process 200 GZ
compressed files each day that contain comma delimited information in
the following format:
HostName, FileName, DirName, Modified_On
Each file contains upwards of 200K rows and works out to be about 20MB when
uncompressed. I need to compare this
information to the information recieved the day before to look for
2007 Jul 31
2
Camping-list Digest, Vol 15, Issue 2
Eli,
This is interesting. I enabled DEBUG logging in Apache and tailed the
error.log. Lo and behold, you''re right, its a problem with one of my
require statements. Namely:
`gem_original_require'': no such file to load -- camping/fastcgi (LoadError)
Strange, it works fine when I do it in IRB, or do it from a ruby script at
the bash prompt. Apache runs as the same user that
2006 Mar 08
12
best way to combine results from two tables
I want to combine a selection of data from two tables and display it as
list. Note that this isn''t a join.
i''m looking for something like this:
Table 1: Sheep
Name, Age, Farmer, etc. (sheep specific columns)
Table 2: Cows:
Name, Age, Farmer, etc. (cow specific columns)
For my display I nneed something like this:
Farmer Jone''s Livestock:
TYPE NAME AGE
Cow
2019 Jun 29
5
Mac OS & Folder Timestamps
So this issue might not strictly a Samba problem, but it happens to be
where I found the issue and maybe there's a solution in the server or
someone who's familiar with the problem. Basically I'm using a Pi as a
small nas. I have a folder /media/ and a script that mounts usb drives
there automatically. So I shared /media/ with smb.conf. Windows & Linux had
no issue accessing the