Note that there are some explanatory texts on larger screens.

plurals
  1. POWorking with existing database of a rails project
    text
    copied!<p>I want to run a ruby on rails project in my Ubuntu 12 mechine.After running the command <code>bundle install</code> i used the following command </p> <pre><code> rake db:drop db:setup </code></pre> <p>it shows </p> <pre><code>-- create_table("art_clas", {:force=&gt;true}) -&gt; 0.3222s -- add_index("art_clas, ["art_id", "clas, {:name=&gt;"index_art_attes_on_art_attribute", :unique=&gt;true}) -&gt; 0.4328s ..................................... ..................................... </code></pre> <p>while i using <code>$ rake db:setup</code> command it shows the existing db's</p> <pre><code>franche_development already exists franche_test already exists -- create_table("art_clas", {:force=&gt;true}) -&gt; 0.3222s -- add_index("art_clas, ["art_id", "clas, {:name=&gt;"index_art_attes_on_art_attribute", :unique=&gt;true}) -&gt; 0.4328s ..................................... </code></pre> <p>Later when i run the project it doesn't show any value from database tables(showing blank). after that i typed following to show the databases. But this operation does not shows my existing databases in the rails project</p> <pre><code>mysql&gt; show databases; +--------------------+ | Database | +--------------------+ | information_schema | | test | +--------------------+ 2 rows in set (0.23 sec) </code></pre> <p>Executing <code>rake db:drop</code> returns nothing</p> <pre><code> $ rake db:drop $ </code></pre> <p>and when running the project displaying </p> <pre><code>Mysql2::Error: Table 'franche_development.arts' doesn't exist: SELECT `arts`.* FROM `arts` WHERE `arts`.`active` = 1 ..... </code></pre> <p>How can i set up and use the existing databases and tables from rails project.</p> <p>Is it due to any code error or database setup??</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload