Displaying 20 results from an estimated 5000 matches similar to: "Converting mysql to postgres"
2006 Jul 11
32
Database Concurrency Without a Web Server?
My Rails application requires a very busy worker process running in the
background at all times. I am launching this non-interactive process
using script/runner. This process is very busy and is communicating
with the MySQL server constantly. As I started putting some load on the
system to test, I started running into performance issues.
I have since discovered that Rails is only using 1
2006 Aug 08
11
Core dump using sample DumbHttpClient
I''m using the current release branch from the repository (version_0)
on freebsd 6.1 with ruby 1.8.4. This is the error that is generated
when running the code below at the bottom of the message, plus a gdb
bt. Sorry no debugging symbols built into ruby but maybe the bt will
help anyways.
terminate called after throwing an instance of ''std::runtime_error''
what():
2008 Jan 14
10
Using EventMachine to listen from non-network
I''ve actually found a way to make EventMachine listen to events from a
serial port, but only by using the pure Ruby version, using Guilliame
Pierronnet''s Ruby/SerialPort library. It turned out to be simpler
than I thought it would be:
require ''serialport''
$eventmachine_library = :pure_ruby
require ''eventmachine''
module EventMachine
class
2006 Jul 10
13
LDAP auth/az for Rails
All:
I recently wrote an LDAP library for Ruby called Net::LDAP, and I''ve
noticed that quite a few people are using it to do authentication and
authorization for Rails apps. I know there are several well-done login
generators for Rails, but what about people that would rather use a
directory?
If we were to write a generator for Rails that used LDAP (or A/D) as the
backend, would
2007 Feb 25
6
Crash occurs where EventMachine.connect is
Hi everyone,
If you subclass EventMachine::Connection and call it outside an
EventMachine::run
event loop, EventMachine crashes! Example:
class Put < EventMachine::Connection
include EventMachine::Deferrable
HOST="localhost"
PORT=8080
def self.request(data)
EventMachine.connect(HOST, PORT, self) {|c|
c.instance_eval { @data = data }
}
end
#
2008 Jan 16
3
getsockname access
Is getsockname (or its equivalent) available to an EM Connection
object? I''d like to access the local port number in my client
application.
--Michael
2007 Aug 15
2
Interfaces for accessing SSL/TLS certificates
Hi everyone. Does anyone have any preferences or ideas for an interface for
SSL certificates, both client-side and server-side? At present, the only
interface is EventMachine::Connection#start_tls, which uses a built-in
self-signed cert on the server side. On the cilent side, it accepts any
well-formed cert (that is, it doesn''t check that the remote cert is signed
by a trusted authority).
2007 Dec 09
38
libevent
Hello,
I have been looking at the Ruby/EventMachine. First let me say it look very
good. Reactor model with no threads makes for fast reliable server, and I
have read about marvelous Twisted framework for Python and am glad to see
something similar for Ruby.
I am writing network app with Ruby threads now and it very slow, and I try
new Ruby 1.9 with native threads that make it much slower.
2006 Aug 08
8
Generating a unique id ?
Hello, I need to generate a unique ID, so far I''ve unit tested this
under 100000 iterations and it seems to work :
now.to_i.to_s + ''-'' + now.usec.to_s + ''-'' + rand(1000).to_s
Is there a better way ?
Thanks
Notes :
1) without usec, few percents of generated values are not uniques
2) the id generated is a string so the presence of
2006 Mar 07
2
Sql Server 2000 booleans not working
I am migrating to sql server 2000 from postgres and I have tried char(1),
int, tinyint and bit datatypes to replace booleans, but without luck. the
1''s and 0''s are stored properly in the db, but checkboxes and dropdowns are
not being auto-populated in rails. Anyone experience this before?
thanx
--
View this message in context:
2006 Aug 15
6
Net::LDAP 0.0.4 released
Announcing version 0.0.4 of Net::LDAP, the pure-Ruby LDAP library.
Thanks to the many people who have used this library and sent in
comments,
suggestions, feature requests, and patches. An even bigger thank-you to
the
folks who have made themselves available to help with testing.
Net::LDAP has been quite stable for several months now, so we bumped
the development status of the library up to
2005 May 19
5
[OT] Sqlite2 question
So, under Sqlite2, if I want to update a database''s schema, I have to
dump the DB, modify the table''s structure, then go and modify EVERY
insert statement.
The insert statements look like (from memory):
INSERT INTO my_table VALUES (''some_id'', ''some_val'', '''', '''', '''',
''some_other
2007 May 24
4
Multiple EM connections on separate threads
Hi EM Gurus,
I''m hoping someone can shed some light on the following...
I''m using a 3rd party (legacy) server that can accept up to 8
simultaneous connections on one port.
I''ve been able to make multiple connections to this server from within
one call to EventMachine::run {...}.
Specificaly, I can access each connection separately using:
em_thread = Thread.new do
2006 Apr 04
9
Does ActiveRecord have support for "Boolean" columns?
Hey all --
I''ve been using enumerable char(1)''s with ''y'' and ''n'' values for my
Boolean columns in Rails, but it strikes me there should be a better
way.
How do you setup columns that represent true/false-ness in your
schemas on Rails?
Wondering what kind of standard approaches there are other than me
writing something like
class MyEntity
2006 Apr 10
1
Add Column After Column in Migrations
Adding a column to a table just places the column at the end, but I
like to keep related columns together. Is there a way to specify
where the column is added in a table with migrations? For example, in
MySQL you can do:
ALTER TABLE my_table ADD COLUMN new_column INT AFTER other_column
I was hoping migrations would support something like this:
add_column :my_table, :new_column, :integer,
2007 Jul 15
2
ssl patch
I made a quick patch to em so it will try to read the key/cert from a
file if it exists in the cwd, and if not use the hardcoded default.
If I added a function in rubymain.cpp to set the location of the pem
file, where in em would be the right place to set it? It should be in
the same scope as start_tls I would think. I''m checking for the pem
file in InitializeDefaultCredentials().
2010 Jan 09
3
tinyint(1) and boolean
So i had a boolean attribute in my model which gets interpreted to
tinyint(1) in mysql by rails migrations. Now tinyint(1) accepts a
range in mysql and i want to change my boolean attribute to an
attribute which can accept 3 values(0,1,2).
I made the change to the view and when i post the form selecting the
selecting the value ''2'', it still gets saved as a ''0''.
2008 Aug 28
2
1 or true in TINYINT(1) column?
Hello, there is a table that has a column TINYINT(1) called status.
Through mysql console I see its value as 1 (when is true) but if I do
this in Rails console:
Mytable.status
=> true
give me "true" rather "1".
How could I change 1 to true using some method?
Or true to 1?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are
2006 Aug 07
2
User Authentication and Authorization with SiteMinder
Hi All
I am new the RoR and would like some advice on how to integrate SiteMinder
authentication/authorization in my Rails app.
For those who are not aware SiteMinder authenticates users and then
redirects the user back to the application that requested authentication
while setting response header which look something like this
2006 Jul 29
29
Dynamically generating 10k pages per second
Hi,
Anyone got an idea of how many web and database servers I''d need to
push out 10,000 dynamic pages per second? Fairly simple pages and
database queries. I''d appreciate recommendations for hardware.
The clients for this project are anticipating large amounts of burst traffic.
Joe