search for: real_connect

Displaying 20 results from an estimated 45 matches for "real_connect".

2006 Dec 01
3
Creating databases on the fly
...e recommended way not to do it?) In my application I wish to be able to create a new database structure for each user who signs up, but there doesn''t seem to be a way of doing this using ActiveRecord. At present I can create it by establishing a new connection to the database dbh = Mysql.real_connect(...) then doing something like this dbh.query("create database " + database_name) which works fine with my windows machine (with mysql-win gem installed) but not my linux server. Any advice is greatly appreciated. Many thanks Tim --~--~---------~--~----~------------~-------~--~----~ Y...
2006 Sep 03
1
Kill my Thread
...uld kill the worker thread, if there is a error in connecting to the database, right? but in my case it doesn''t and goes on doing other stuff. Of course...there are lots of work arounds for this, but how do i make sure that, the thread is killed at that point of time. begin @dbh = Mysql.real_connect ("localhost","root","","typo_#{username}", at sql_port, at blog_socket) rescue Exception => e @logger.debug("### Error connecting to the database : #{e.to_s}") kill end -- nothing much to talk -------------- next part -------------- An HTML...
2010 Feb 20
1
Looking for a small database testing application
I keep getting an error when I try to run a redmine installation. This is what comes up. .gems/gems/activerecord-2.3.5/lib/active_record/connection_adapters/ mysql_adapter.rb:589:in `real_connect'': Can''t connect to local MySQL server through socket ''/var/run/mysqld/mysqld.sock'' (2) (Mysql::Error) The database server is a remote server, and I can''t see why activerecord is complaining about the absence of a local socket. The part of the installat...
2013 Jun 05
3
dashboard/passenger not connecting on port 8140
...ent (first_time) ** Execute environment ** Execute db:migrate rake aborted! Access denied for user ''dashboard''@''localhost'' (using password: YES) /etc/puppet/puppet-dashboard/vendor/rails/activerecord/lib/active_record/connection_adapters/mysql_adapter.rb:620:in `real_connect'' /etc/puppet/puppet-dashboard/vendor/rails/activerecord/lib/active_record/connection_adapters/mysql_adapter.rb:620:in `connect'' These are the gems i have installed locally gem list --local *** LOCAL GEMS *** activesupport (3.2.9) arel (3.0.2) builder (3.1.4) bundler (1.2.3)...
2013 Mar 07
1
HELP:Custom function didn't work
...Here is the function rb(this function should return the type I defined in the database): #hosttype.rb require "mysql" module Puppet::Parser::Functions newfunction(:hosttype, :type => :rvalue, :doc => "Gets host type from db.") do |args| dbh = Mysql.real_connect("mysql_server_ip", "username", "password", "puppet") res = dbh.query("SELECT host_type FROM host_extra_info where name=''" + args[0] + "''") # return res.fetch_row puts res.fetch_row r...
2005 Feb 13
6
Apache config help needed
Hi all, I''m (STILL) plugging away trying to get rails to work under Apache2 Rails 0.9.5 Apache 2, OS Mandrake Linux 10.1 Apache is already running other stuff on /pluto/ and /localhost/ so I wish to install a new virtual host for rails to avoid upsetting anything. Added rails to my hosts file, and edited conf/Vhosts.conf to contain NameVirtualHost 192.168.0.254 <VirtualHost
2006 Jul 28
1
putty mysql error
...box. /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.14.2/lib/active_record/ven?dor/mysql.rb:508:i n `read'': Unknown database ''db_develoment'' (Mysql::Error) from /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.14.2/lib/active_record/ven?dor/m ysql.rb:150:in `real_connect'' from /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.14.2/lib/active_record/con?necti on_adapters/mysql_adapter.rb:331:in `connect'' from /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.14.2/lib/active_record/con?necti on_adapters/mysql_adapter.rb:88:in `initia...
2005 Dec 01
0
symlink and 0.14.3
...ome/httpd/htdocs/ujautoszalon2/../config/.. Application Trace | Framework Trace | Full Trace /usr/lib/ruby/gems/1.8/gems/activerecord-1.13.0.2969/lib/active_record/vendor/mysql.rb:510:in `read'' /usr/lib/ruby/gems/1.8/gems/activerecord-1.13.0.2969/lib/active_record/vendor/mysql.rb:152:in `real_connect'' /usr/lib/ruby/gems/1.8/gems/activerecord-1.13.0.2969/lib/active_record/connection_adapters/mysql_adapter.rb:41:in `mysql_connection'' /usr/lib/ruby/gems/1.8/gems/activerecord-1.13.0.2969/lib/active_record/connection_adapters/abstract/connection_specification.rb:121:in `send'...
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?
2012 Jan 05
4
mySQL: ERROR 1045: Access denied for user 'root'@'localhost' (using password: NO)
...quot;controller"=>"book"} Mysql::Error (Access denied for user ''root''@''localhost'' (using password: NO)): C:/InstantRails-2.0-win/ruby/lib/ruby/gems/1.8/gems/ activerecord-2.0.2/lib/active_record/connection_adapters/ mysql_adapter.rb:471:in `real_connect'' C:/InstantRails-2.0-win/ruby/lib/ruby/gems/1.8/gems/ activerecord-2.0.2/lib/active_record/connection_adapters/ mysql_adapter.rb:471:in `connect'' C:/InstantRails-2.0-win/ruby/lib/ruby/gems/1.8/gems/ activerecord-... " --------------------------------------------------...
2009 Jan 21
5
Runner suddenly fails...
I have some jobs running through cron jobs and runner that suddenly starts failing. This is how it looks: from /usr/local/lib/ruby/gems/1.8/gems/rails-2.1.2/lib/commands/runner.rb:47 from /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require'' from /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `require'' from
2005 Mar 23
1
Can't connect to local MySQL server through socket '/tmp/mysql.sock' (61)
...o you have any clue why this is happening? This is the error: Mysql::Error (Can''t connect to local MySQL server through socket ''/tmp/mysql.sock'' (61)): /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.9.0/lib/active_record/connection_adapters/mysql_adapter.rb:39:in `real_connect'' /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.9.0/lib/active_record/connection_adapters/mysql_adapter.rb:39:in `mysql_connection'' /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.9.0/lib/active_record/connection_adapters/abstract_adapter.rb:136:in `send'' /...
2006 Apr 30
3
MySQL connection problems on Dreamhost
...pens? It''s rather intermittent and random, but I get this a few times a week. I''ve pasted a large section of the call stack below in case it helps. Thanks! Jeff /usr/lib/ruby/gems/1.8/gems/activerecord-1.13.2/lib/active_record/connection_adapters/mysql_adapter.rb:316:in `real_connect'' /usr/lib/ruby/gems/1.8/gems/activerecord-1.13.2/lib/active_record/connection_adapters/mysql_adapter.rb:316:in `connect'' /usr/lib/ruby/gems/1.8/gems/activerecord-1.13.2/lib/active_record/connection_adapters/mysql_adapter.rb:87:in `initialize'' /usr/lib/ruby/g...
2007 Dec 14
3
Issue with upgrading to 2.0 on Leopard? Or something else?
...load localhost:3000 into my browser and try to show the info about the application''s environment: Mysql::Error in Rails/infoController#properties And here''s the trace: /Library/Ruby/Gems/1.8/gems/activerecord-2.0.1/lib/active_record/ connection_adapters/mysql_adapter.rb:471:in `real_connect'' /Library/Ruby/Gems/1.8/gems/activerecord-2.0.1/lib/active_record/ connection_adapters/mysql_adapter.rb:471:in `connect'' /Library/Ruby/Gems/1.8/gems/activerecord-2.0.1/lib/active_record/ connection_adapters/mysql_adapter.rb:165:in `initialize'' /Library/Ruby/Gems/1.8/gems/...
2006 Jun 03
10
Ruby on Rails on MacBook
...denied for user ''root''@''localhost'' (using password: YES) After turning on --trace switch, it showed the error happened at the following line: /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.14.2/lib/active_record/connection_adapters/mysql_adapter.rb:331:in `real_connect'' I don''t whether it''s a rails problem or mysql problem. But I thought I would give it a shot by posting the question here. Thanks in advance. Regards, Simon -- Posted via http://www.ruby-forum.com/.
2007 Aug 06
4
problem with rails_root
...s/1.8/gems/activerecord-1.15.3/lib/active_record/vendor/mysql.rb:111:in `initialize'' /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/vendor/mysql.rb:111:in `new'' /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/vendor/mysql.rb:111:in `real_connect'' /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/connection_adapters/mysql_adapter.rb:389:in `connect'' /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/connection_adapters/mysql_adapter.rb:152:in `initialize'' /usr/local/lib/r...
2006 Mar 31
1
Ruby 1.8.4 upgrade screws up ActiveRecord
...ere''s what I get: Errno::EBADF in Front#index Bad file descriptor - connect(2) c:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.14.0/lib/active_record/vendor/mysql.rb:108:in `initialize'' c:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.14.0/lib/active_record/vendor/mysql.rb:108:in `real_connect'' c:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.14.0/lib/active_record/connection_adapters/mysql_adapter.rb:331:in `connect'' c:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.14.0/lib/active_record/connection_adapters/mysql_adapter.rb:88:in `initialize'' c:/ruby/lib/ruby/gems...
2008 Sep 22
0
проблема gem install mysql CenOS
.../production.log содержатся такие строки: Mysql::Error (дПУФХР ЪБЛТЩФ ДМС РПМШЪПЧБФЕМС 'root'@'localhost' (ВЩМ ЙУРПМШЪПЧБО РБТПМШ: оеф)): /opt/ruby-enterprise-1.8.6-20080810/lib/ruby/gems/1.8/gems/ activerecord-2.0.2/lib/active_record/connection_adapters/ mysql_adapter.rb:471:in `real_connect' ..... и еще много-много. К тому же не получается воспользоваться mysqladmin, пишет: mysqladmin: connect to server at 'localhost' failed Вот в общем и все, я понимаю что вопрос больше по настройке сервера, чем по rails, но все же прошу помочь. Заранее благодарю. --~--~---------~--~----...
2010 Dec 07
0
Is this error related to connection pool
...again to remove this errors. But after some time the same errors again happens 1) Mysql::Error (Can''t connect to MySQL server on ''localhost'' (10048)): C:/Ruby186/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/connection_adapters/mysql_adapter.rb:548:in `real_connect'' C:/Ruby186/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/connection_adapters/mysql_adapter.rb:548:in `connect'' C:/Ruby186/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/connection_adapters/mysql_adapter.rb:198:in `initialize'' ----...
2011 Jul 14
0
ruby-1.8.7 + mysql-5.1.58 = Mysql::Error: #08S01Bad handshake
...ction.select_all("SELECT NOW();") Mysql::Error: #08S01Bad handshake from /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.15.5/lib/ active_record/vendor/mysql.rb:523:in `read'' from /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.15.5/lib/ active_record/vendor/mysql.rb:153:in `real_connect'' from /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.15.5/lib/ active_record/connection_adapters/mysql_adapter.rb:389:in `connect'' .... -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, s...