Displaying 20 results from an estimated 100 matches similar to: "Show SQL request without issuing it"
2006 Jan 13
1
How to disconnect to a database????
Hi,
We have experienced some problems with
ActiveRecord::Base class of Ruby-Rails. We are
building a web-application based on the Ruby-rails
framework and the web-application needs to access to
difference databases, so we do not pre-define our
database accesses in the database.yml file. In fact,
we are using the
ActiveRecord::Base.establish_connection() to connect
to our database, the function
2006 Jan 05
7
HOWTO: Combine fields from 2 two tables in 1 object
Hi all,
For a dropdownlist (showing "Company - FirstName Lastname'') I want to fill an
object @project_contacts with "Name" from table Companies and "Firstname" and
"Lastname" from table contacts. Any idea?
Regards,
Gerard.
--
"Who cares if it doesn''t do anything? It was made with our new
Triple-Iso-Bifurcated-Krypton-Gate-MOS
2006 Dec 14
8
ActiveRecord outside of rails
I have a few questions regarding using activerecord outside of rails.
Usage is with legacy databases, which gives rise to some of the
problems.
Probably the first, and most simple question though, is how to capture
the SQL log, with which I can hopefully figure the other stuff out.
I''m currently trying
ActiveRecord::Base.logger = Logger.new STDOUT
Based on random googles, but it
2006 May 18
0
Showing SQL in script/console
Is there an easy way to display the SQL in script/console (similar to
what is done in development.log)? The following works but it''s ugly:
$ script/console
Loading development environment.
>> class ActiveRecord::ConnectionAdapters::AbstractAdapter
>> def logger= (logr)
>> @logger = logr
>> end
>> end
=> nil
>>
2006 Jun 16
0
rake spec controller test output hideus.
Is there any way to change the output of rake spec fails?
The errors are just totally over the top ugly and not helpful. First
of all the ruby -Ilib line always comes before each test and I find it
distracting. But if an error occurs on something that is not nil it
just gives me the entire contents of that object and that is no small
matter when the object is a HTTP request response.
Here is
2006 Jan 11
1
logger in my classes
Hi,
I wrote a class which is not an AR extension, nor a controller.
I''d like to use logger.* methods there too.
My class is in lib/ dir. I include it in environment.rb with the line
require ''lib/localization''
just after the line
require File.join(File.dirname(__FILE__), ''boot'')
I tried many ways to reuse the logger class. The cleaner way seemed to
2006 Jul 05
2
Serialized object behaves weird
Hi!
I got a class named EinsatzFilter which I serialized to session. Before
saving to session it works afterwards I keep getting the message:
"undefined method `to_s'' for #<Person:0x38c6ab8>". "Person" is a from
ActiveRecord::Base inherited class.
Code:
class EinsatzFilter
include ApplicationHelper
attr_reader :personen, :monat, :projekte, :kunde
2007 Oct 05
5
PostgreSQL, templates, and test databases
Hi everyone.
I''m having a bit of a problem with an application I''m currently
developing with Rails 1.2.3 and PostgreSQL, attempting to use test-first
development. Here''s the scenario:
* I have the usual three databases, with migrations. Testing has been
working beautifully.
* I need to store geographic data, so I add PostGIS to all three
databases (along with
2007 Mar 12
5
index.rb:384 [BUG]
Hi folks,
I''ve working and playing with acts_as_ferret and follow this fantastic
tutorial:
http://www.railsenvy.com/2007/2/19/acts-as-ferret-tutorial
When I try to implement the field storage tip, it crash. So, I try to
make it via script/console:
1. I have a simple model called Articles:
class Article < ActiveRecord::Base
acts_as_ferret :fields =>
2006 Aug 28
1
stop words and /''s
Hi new version of ferret and acts as ferret have sorted out the scary
glibc *** linked list pointer errors, thank god! New version are good
but some searches are still not working. It is mostly the stop words
ones. For example the "For Sale/Free/Swap" fails but works when "for" is
stripped out. I have read all the recent posts regarding this issue and
failed to get it to
2006 Sep 04
7
0.10.2 release with win32 gem
Hey all,
I''ve just released Ferret version 0.10.2. It is mostly just a bug fix
release. The only change is that a highlight method has been added to
Ferret::Index::Index. Please try it out and let me know what you
think.
The big news for this release is that there is also a binary win32 gem
included. This is the first time I''ve build a gem like this so please
let me know if
2007 Sep 18
10
Routes
hi all,
I want to move some routing tasks out of the router and into the
controller. The goal is to make Merb feel less like mod_rewrite and
give the user more control at the controller. The new Router is
simple: it takes the path_info (not the whole request) then outputs a
controller class and some parameters from the path matching. The rest
of the routing would be done at the controller level.
2006 Oct 10
5
oddness when adding to index -
I was having some odd results when working with acts_as_ferret (current
trunk), so I decided to test with the current version of ferret to see
if I encountered the same problem. I did. Here are the details:
installed ferret 0.10.10 on debian sarge with ''sudo gem install ferret''
(btw, same results on OSX)
opened up an irb session:
irb(main):001:0> require
2005 Oct 27
1
Logger datetime_format not working ?
I''m trying to configure logger in a rails app.
I added this to my environment.rb :
RAILS_DEFAULT_LOGGER.datetime_format = "%Y-%m-%d %H.%M.%s"
Yet, none of the entries in the development.log show the datestamp.
What can you tell me about this ?
Thanks.
Peter Fitzgibbons
_______________________________________________
Rails mailing list
2006 Apr 05
3
Issuing an ajax request to a different web server?
Is it possible to have an Ajax request go to a different server than
the one that originally rendered the web page? I am attempting this,
but the ajax server never gets the request.
For example, inside a form:
<%= submit_to_remote(''add_lead'',''Add Lead(s)'',
:url =>
"http://123.456.789.0:3000/users/add_lead",
2006 Mar 09
2
issuing raw SQL in Rails
Hi -- I have a need to run the following SQL in a test:
"DELETE FROM agents_bookings"
Does anyone know of a way that I can just execute this?
It is to clear a many-to-many relationship in the teardown function of a
test.
Cheers,
doug.
--
Posted via http://www.ruby-forum.com/.
2007 Sep 11
0
Using machine account credentials for issuing standalone ldap queries against a Windows 2000 Active Directory server
Hello All,
This might come across as a rather strange and interesting question related to using machine account credentials to issue standalone ldap queries against an Active Directory server.
We are using Samba and use 'ads' mode to join the machine onto the Active Directory (net ads join).? Once the machine is joined to the domain,?we do not have access to the username and password
2008 Nov 18
0
xenfb issuing notify_remote_via_irq() too early
After some changes resulting in the irq (since used as an array index) to
be converted to unsigned int, we''re observing oopses resulting from xenfb
calling notify_remote_via_irq() with -1 as the irq argument. Clearly, the
two possible simple work-arounds would be to either make the event
channel code always tolerate and ignore invalid irq inputs or to prevent
the call to
2009 Jul 23
1
[LLVMdev] Issuing Diagnostics in llvm-ld
Hi,
llvm-ld currently does not have the diagnostics framework.
PIC16 does not support recursion and we want to diagnose that in llvm-ld
and issue an error. Is that doable with ease (as far as the flashing an
error message is concerned)?
- Sanjiv
2006 Nov 24
1
fail to exit shell after issuing 'ssh -f .... targethost.foo.bar sleep 500000'
Hi,
Software in use:
OpenSSH-Version: 4.5p1
OpenSSL-Version: 0.98d
zlib-Version: 1.2.3
OS-Platform: AIX 5.3 ML4
Problem:
when issuing following command on an AIX host:
$ ssh -2 -n -f -x -L6666:localhost:6666 -o BatchMode=yes targethost sleep
500000
$ exit
the shell is waiting for the finish of issued command (sleep).
The expected behaviour of above command should be, that the shell would