SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Member
    Join Date
    Jun 2008
    Posts
    23
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Help with Database Code

    Hi guys I am back with a request for some help. I am a nOOb to the Ruby on Rails and I am loving it so far!!! I am learning the rails portion and I have our database website programed in Ruby on Rails. I have a copy of it and I am able to break it trying to learn. If I have too I can reload it from a CD again. I am trying to run it right now so later I can add changes with code that I have learned with tutorials provided by this community. Below is what I have with the errors:

    From test_helper.rb
    --------------------------------------------------------------------------------
    ENV["RAILS_ENV"] = "test"
    require File.expand_path(File.dirname(__FILE__) + "/../config/boot")
    require 'test_help'
    --------------------------------------------------------------------------------

    Error I am getting when running the script:
    --------------------------------------------------------------------------------
    RubyMate r8136 running Ruby r1.8.6 (/opt/local/bin/ruby)
    >>> test_helper.rb

    LoadError: no such file to load /Users/tomdooley/Documents/mnuts/config/boot

    method require in test_helper.rb at line 2
    at top level in test_helper.rb at line 2
    Program exited.
    ----------------------------------------------------------------------------------

    Any information on why I am unable to run the program will be appreciated.

  2. #2
    SitePoint Member
    Join Date
    Jun 2008
    Posts
    23
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Exclamation

    I have a better question than before with better detail of what is going on with my steps. What I have for our database is the test folder and all its files involved for our web app. I was wondering how I can set up the project with what I have by adding our existing test folder. In the terminal I ran "rails -d mysql testApp". Then I used "cd testApp" to get to my folder. Next I used "script/server" then browsed to the test website. I closed the server and then deleted the index.html from its public directory. Now I ran "rails testApp -d mysql" followed by "script/generate scaffold testApp title:string description:text". Now I proceeded with "rake db:create:all" followed by "rake db:migrate". At this point I opened the config/route.rb folder and added this command at the bottom "map.root :controller => "books", :action => "index"". I started up the "script/server" and opened up Safari. Using this url "//localhost:3000 (I took out the http: because I do not have the privilege to use links yet)" I was able to see content containing my testApp but it looks nothing like our database we use daily. What do I need to do to properly set up the database with the test code folder that has preexisting code?


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
  •