SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Evangelist
    Join Date
    Jul 2005
    Posts
    456
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    ruby and sql question...

    hi guys,
    ive been given an existing site thats been developed in ruby. there is a database generating content. i pressume its mySQL.
    Im using HeidiSQL which is a GUI for mySQL. Does anyone know if i can import the existing db into Heidi? In the db folder in my application there is a 'migrate.rb' file and a 'migrate' folder with lots of rb files in it.
    In other words, how can i get the database up and running.
    thanks.
    - G

  2. #2
    SitePoint Guru
    Join Date
    Aug 2005
    Posts
    986
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Check your config/database.yml: the database configuration is in this file. You should first create a database, and then you put the name of this database in the configuration file. Now you can import the database schema by typing `rake db:migrate` in a terminal.

  3. #3
    SitePoint Evangelist
    Join Date
    Jul 2005
    Posts
    456
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    hi Fenrir2,
    ok, ive created a new db in Heidi (called the same as the db specified in the existing database.yml).
    by 'terminal', did you mean in the cmd prompt? i navigate to my app folder and type 'rake db:migrate'. i press enter and it says '<in c:/rails/mywebsite>' and then closes the cmd window. as far as i can see its done nothing. i was expecting to see my db being populated with all the tables and data, but i dont think its done anything. have i done something wrong?
    many thanks

  4. #4
    SitePoint Evangelist
    Join Date
    Jul 2005
    Posts
    456
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    hi Fen, ok, ive used phpmyadmin to export the db (from the live sites control panel) into heidi on my local machine. so that has popuated my local db. but when i try to access any of teh pages i get: #28000Access denied for user 'caroline_admin'@'localhost' (using password: YES)
    im going to create another post for this topic as it probably warrants one. thanks.
    - G


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •