mysql - Aptana - 如何将默认值从 sqlite3 更改为使用 MySql?

标签 mysql ruby-on-rails aptana

刚刚安装了 Aptana 并使用 MacPorts 更新了 Rails 项目的所有附加功能。当“运行”项目以在浏览器中查看它时,它显示以下错误。

Home$ 脚本/rails 服务器 在任何 gem 源列表中都找不到 gem 'sqlite3-ruby (>= 0, runtime)' d 在你的 Gemfile 中。 尝试运行bundle install

我希望它使用 MySQL 作为默认值 - 我该怎么做?

最佳答案

在你的 gemfile 中:

gem 'mysql2'

在数据库.yml中:

development:
  adapter: mysql2
  encoding: utf8
  reconnect: false
  database: your_site_development
  pool: 5
  username: root
  password: password
  socket: /tmp/mysql.sock

关于mysql - Aptana - 如何将默认值从 sqlite3 更改为使用 MySql?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4608878/

相关文章:

php - 从数据库检索数据并显示在网页上不起作用

MySQL 加入 3 个表

php - 当用户在选择字段中选择新选项时,如何运行 mysql 查询?

php - 如何从 PHP 访问 Sharepoint 列表?

ruby-on-rails - 如何配置 Rails 5.2.1 服务器监听所有接口(interface)?

eclipse - Aptana 插件使 Eclipse 崩溃

ruby-on-rails - 如何在 Ubuntu 的 Aptana Studio3 上 :Debugging Rails 3. 1.x 应用程序(Ruby 1.9.3)

ruby-on-rails - 在 Heroku 上运行 delay_job worker ?

ruby-on-rails - 在 session_controller#create 上设计错误数量的参数(2 为 1)

aptana - 未知的快捷方式 "and Insert Terminator + LF"