8上的导轨安装红宝石

8上的导轨安装红宝石

本文介绍了如何安装sqlite的或PostgreSQL在Windows 8上的导轨安装红宝石?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在试图安装一个数据库我的Ruby on Rails的安装程序的一部分。我在运行64位的Windows 8,基于x64的机器。我的红宝石版本是2.1.3p242,导轨的版本是4.0.0,sqlite3的版本是3.8.6和PostgreSQL的版本是9.3我第一次尝试按照本给出的步骤来安装sqlite3的SO回答但我得到这个错误

I've been trying to install a database as part of my ruby on rails setup.I'm running a 64 bit windows 8, a x64 based machine.My ruby version is 2.1.3p242, rails version is 4.0.0, sqlite3 version is 3.8.6 and postgresql version is 9.3I first tried to install sqlite3 by following the steps given in this SO answer but I get this error

`require': Could not load 'active_record/connection_adapters/sqlite3_adapter'. Make sure that the adapter in config/database.yml is valid.

我的database.yml有sqlite3的为适配器键的所有三种环境的价值。
接下来,我尝试将其安装正确安装PostgreSQL的。我发射了pgadmin3 GUI和启动数据库服务器。但是,当我开始Rails服务器。我收到以下错误

My database.yml has 'sqlite3' as the value for the adapter key for all three environments.
Next I try to installed postgresql which was installed properly. I fired up the pgadmin3 GUI and started the database server. But when I start the rails server. I get the following error

C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/pg-0.17.1-x64-mingw32/lib/pg.rb:10:in `re
quire': cannot load such file -- 2.1/pg_ext (LoadError)

感谢。

推荐答案

您需要使用PG的pre的释放。

You need to use the pre release of pg.

  1. 安装

  1. Install

gem install pg -v 0.18.0.pre20141117110243 --pre

  • 添加到您的宝石文件

  • Add to your Gem file

    gem 'pg', '~> 0.18.0.pre20141117110243'
    

  • 更​​新与捆绑

  • Update with Bundle

    bundle update
    

  • 这篇关于如何安装sqlite的或PostgreSQL在Windows 8上的导轨安装红宝石?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

    08-07 07:36