mko
mko

Reputation: 22064

Can't run this Rails app

Hey guys, I clone a repo in Github: https://github.com/huacnlee/homeland/tree/

when I run the server, I got this error:

Agro:homeland Zhulin$ rails s
DEPRECATION WARNING: railtie_name is deprecated and has no effect. (called from <top (required)> at /Users/Zhulin/Desktop/RailsApps/homeland/config/application.rb:9)
/usr/local/lib/ruby/1.9.1/syck.rb:145:in `initialize': No such file or directory - /Users/Zhulin/Desktop/RailsApps/homeland/config/config.yml (Errno::ENOENT)
    from /usr/local/lib/ruby/1.9.1/syck.rb:145:in `open'
    from /usr/local/lib/ruby/1.9.1/syck.rb:145:in `load_file'
    from /Users/Zhulin/Desktop/RailsApps/homeland/config/application.rb:48:in `<top (required)>'
    from /usr/local/lib/ruby/gems/1.9.1/gems/railties-3.0.0/lib/rails/commands.rb:28:in `require'
    from /usr/local/lib/ruby/gems/1.9.1/gems/railties-3.0.0/lib/rails/commands.rb:28:in `block in <top (required)>'
    from /usr/local/lib/ruby/gems/1.9.1/gems/railties-3.0.0/lib/rails/commands.rb:27:in `tap'
    from /usr/local/lib/ruby/gems/1.9.1/gems/railties-3.0.0/lib/rails/commands.rb:27:in `<top (required)>'
    from script/rails:6:in `require'
    from script/rails:6:in `<main>'

What should I do? And BTW where can I find simpler Rails code for learning Ruby and Rails, Thanks

Upvotes: 0

Views: 611

Answers (2)

tadman
tadman

Reputation: 211590

It looks like you're missing your database configuration file config/database.yml for some reason. These are generated automatically by rails new <appname> so it is easy to get a replacement.

As for examples, a good reference book is always best. I like the Agile Web Development with Rails book, but there are many others.

Upvotes: 1

Dylan Markow
Dylan Markow

Reputation: 124419

You need to set up a config.yml file in the config folder. It looks like the repo includes a config.yml.default file that you can use as a template.

Upvotes: 5

Related Questions