On 3/8/06, Matt Kent <[EMAIL PROTECTED]> wrote:
ExecuteSQL (and the other RadRails data tools) don't work with the socket connection. They use JDBC, which uses a host/port connection.On 3/8/06, Victor Kane <[EMAIL PROTECTED] > wrote:I'm having a little problem, the Data perspective is not working on my setup: generator talks to MySql fine, and the generated app can read and write from the database (i.e., database.yml is ok); and yet when I try to execute an SQL from within RadRails, I get a stack trace.
java.net.SocketException: Connection refused.
My database.yml looks like this:
development:
adapter: mysql
database: depot_development
host: localhost
socket: /var/run/mysql/mysql.sock
username: xxxxxx
password: xxxxxx
See my (work in progress) RadRails AWDWR tutorial to see the rest of my setup:
http://wiki.awebfactory.com.ar/awebfactory/published/DepotAppWithRadRailsIterationA1
I can think of two possibilities:
1. Java MySql connector not seen (where should I put it???)
2. Execute SQL doesn't work with socket connection method?
I am working on a Linux box with latest version of everything:
bash-3.00$ uname -a
Linux mentor 2.6.13 #1 Sat Sep 3 21:11:20 PDT 2005 i686 unknown unknown GNU/Linux
bash-3.00$ java -version
java version " 1.5.0_04"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_04-b05)
Java HotSpot(TM) Client VM (build 1.5.0_04-b05, mixed mode)
bash-3.00$ rails -v
Rails 1.0.0
bash-3.00$ ruby -v
ruby 1.8.3 (2005-09-21) [i686-linux]
bash-3.00$
thanks in advance,
Victor KaneOn 3/8/06, Matt Kent < [EMAIL PROTECTED]> wrote:The minimum requirements are basically Rails 1.0 and its dependencies (also Java 1.4.2 or later). I would not use InstantRails.On 3/8/06, Victor Kane < [EMAIL PROTECTED]> wrote:I am just about to publish that part of my own tutorial!
I would say RadRails needs the newest and shiniest of everything; another guy on the internet had your problem, and ran "gem update" to fix the problem you are reporting, and fixed it with the "gem update" command (see http://fo64.com/articles/2005/10/22/scaffold-db-schema-error).
Anyone know offhand what the minimum requirements of RadRails is to run?
The RadRails documentation says to grab the latest version of InstantRails ( http://instantrails.rubyforge.org/wiki/wiki.pl ).
Does updating your environment help? Suppose a decent tutorial should include such advice!On 3/8/06, Vipul Bhatt < [EMAIL PROTECTED]> wrote:I am following along Chapter 6, pages 47-54, of the book Agile Web
Development with Rails. My plan was to learn from that book, but
using RadRails.
First, I created the three databases from Windows command prompt
(depot_development, depot_test and depot_production). Next, I made
a file "create.sql" containing SQL statements for creating the
table "products". I put it in depot/db folder. Then in RadRails
navigator, I right-clicked on that file and selected "execute SQL".
It was executed successfully. I could switch to Data perspective,
double-click on "development" database and see all the column names
of that table.
I used RadRails generator to generate a scaffold. The output was
not what I was expecting:
/////////////////
depot> ruby script/generate scaffold Product Admin
exists app/controllers/
exists app/helpers/
exists app/views/admin
exists test/functional/
dependency model
exists app/models/
exists test/unit/
exists test/fixtures/
identical app/models/product.rb
identical test/unit/product_test.rb
identical test/fixtures/products.yml
error Before updating scaffolding from new DB schema, try
creating a table for your model (Product)
/////////////////
Huh? The table "products" already exists. So what gives?
Thank you in anticipation.
Vipul
_______________________________________________
RadRails mailing list
RadRails@radrails.org
http://lists.radrails.org/mailman/listinfo/radrails
_______________________________________________
RadRails mailing list
RadRails@radrails.org
http://lists.radrails.org/mailman/listinfo/radrails
_______________________________________________
RadRails mailing list
RadRails@radrails.org
http://lists.radrails.org/mailman/listinfo/radrails
_______________________________________________
RadRails mailing list
RadRails@radrails.org
http://lists.radrails.org/mailman/listinfo/radrails
_______________________________________________
RadRails mailing list
RadRails@radrails.org
http://lists.radrails.org/mailman/listinfo/radrails
_______________________________________________ RadRails mailing list RadRails@radrails.org http://lists.radrails.org/mailman/listinfo/radrails