在 OSX 10.5.8 上设置 Rails/sqlite3
我正在尝试开始学习 Rails 教程并完成安装。我是新手。
1.运行“rails new app1
”。 - 应用程序已创建,但捆绑程序失败(看起来它是作为 rails new
命令的一部分运行的
安装 sqlite3 (1.3.5) 时发生错误,
- 更改了 gemfile 以显式调用
“gem 'sqlite3-ruby', '1.2.5', :require => 'sqlite3'
(这是适用于 osx 10.5 的最新版本)” - 运行“bundle install” - 成功
尝试查看默认应用程序并查看错误
<块引用>ActiveRecord::ConnectionNotEstablished
在 config/database.yml 中查找。它说“
database: db/development.sqlite3
”- 在 db/ 中查找 - 这里没有数据库。 - - 数据库应该在
rails new
期间创建吗? - 尝试运行
rake db:migrate
- get <块引用>“耙子中止! :请安装 sqlite3 适配器:
gem install activerecord-sqlite3-adapter
(sqlite3 不是捆绑包的一部分。将其添加到 Gemfile。)"
ERROR: Could not find a valid gem 'activerecord-sqlite3-adapter' (>= 0) in any repository
ERROR: Possible alternatives: activerecord-jdbcsqlite3-adapter, activerecord-sqlserver-adapter, activerecord-spatialite-adapter, activerecord-n
ulldb-adapter, activerecord-dbslayer-adapter
有人知道我错过了什么吗?
有人知道我需要做什么吗? OSX 10.5.8(豹) 导轨3.2.0 红宝石 1.9.2
I'm trying to get get going on a rails tutorial and get get past the installation. I'm a newbie.
1 . ran "rails new app1
." - The app is created but bundler fails (looks like it is run as part of the rails new
command
An error occured while installing sqlite3 (1.3.5),
- changed the gemfile to explicitly call for
"gem 'sqlite3-ruby', '1.2.5', :require => 'sqlite3'
(this is the most recent version that works on osx 10.5)" - ran "bundle install" - success
try to view the default app and see the error
ActiveRecord::ConnectionNotEstablished
looked in config/database.yml. It says "
database: db/development.sqlite3
"- looked in db/ - no database here. - - Is a db supposed to be created during
rails new
? - Tried running
rake db:migrate
- get"rake aborted!
: Please install the sqlite3 adapter:gem install activerecord-sqlite3-adapter
(sqlite3 is not part of the bundle. Add it to Gemfile.)"
Tried running that command, got
ERROR: Could not find a valid gem 'activerecord-sqlite3-adapter' (>= 0) in any repository
ERROR: Possible alternatives: activerecord-jdbcsqlite3-adapter, activerecord-sqlserver-adapter, activerecord-spatialite-adapter, activerecord-n
ulldb-adapter, activerecord-dbslayer-adapter
Anyone know what I'm missing?
Anybody have an idea what I need to do?
OSX 10.5.8 (leopard)
rails 3.2.0
ruby 1.9.2
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
好吧,最后一部分听起来有点毛茸茸的,但是要对数据库进行排序,您需要:
...不是迁移,而是创建数据库。
...向您显示选项,以供将来参考。让我们看看之后会发生什么:)
Well that last part is a bit hairy sounding, but to get your database sorted you want:
...not migration, to create the database.
...shows you the options, for future reference. Let's see what happens after that :)