0

Does rails 3.2.16 version have scaffoldind method? if it has then what to do to implement it ?

How do I edit database.yml file to use mysql as adapter ?

Robert
  • 5,278
  • 43
  • 65
  • 115

1 Answers1

0

Add to Gemfile:

gem 'mysql2'

Then in your database.yml for each env respectively

development:
 adapter: mysql2
 encoding: utf8
 reconnect: false
 database: db_name
 pool: 5
 username: root
 password: root
 timeout: 5000

for scaffolding new rails project with mysql database:

rails new -d mysql

for more details run

rails new -h
  • in bitnami ruby stack console i run the command: rails new project_name -d mysql . but in the end console shows : an error occured installing mysql2 and bundler can not continue. make sure that 'gem install mysql2 -v '0.3.14' ' succeeds before bundling. – user3038011 Jan 08 '14 at 18:11
  • Seems you don't have required dependencies for mysql client libraries. What kind of operating system are you using? e.g Linux/MacOs? – user3173492 Jan 08 '14 at 20:13
  • do you have mysql installed ? looks like no. this should help http://dev.mysql.com/downloads/mysql/ also this link should help you http://stackoverflow.com/questions/5996834/how-to-install-ruby-on-rails-with-mysql-and-get-it-working-a-step-by-step-guide – user3173492 Jan 09 '14 at 09:54