Tag: compiler errors

为什么我无法使用rails 4.0.0.rc1(ruby 2.0)安装postgresql

第一次在论坛上,所以我会尝试尽可能具体,抱歉任何可能的拼写错误? 我相对较新的rails(不到一年),我想制作一个默认项目来使用它。 我一直在开发中使用sqlite3而在生产中使用pg(heroku),但现在我想把事情弄好(我遇到了sqlite3运行正常但pg没有的问题)并在生产和devlop中同时使用pg。 我花了2天时间搜索foruns并且所有的anwsers都是旧的或其他版本/其他操作系统。 我将尝试列出我为设置舞台所采取的步骤:在这里我的配置: -OS:Windows 7 64x -Editor:Aptana Studio -PostGresql -Rails 4.0.0.rc1 -Ruby 2.0 下载并安装postgresql-9.2.4-1-windows-x64 将默认密码设置为postgresql 在postgresql中创建一个具有所有特权的角色“my_user” 创建测试数据库“rails_test” 打开Aptana Studio并初始化一个新的默认项目,转到项目文件夹,然后运行“rails new。-d postgresql”来生成新项目。 安装pg gem“gem install pg”“gem list”正确显示pg gem 配置“database.yml”以使用正确的用户名和密码 development: adapter: postgresql encoding: unicode database: rails_test pool: 5 username: my_user password: 12345 在ruby中运行一些命令,如“gem update”,“bundle install” 然后,当我尝试生成模型并使用rake db:migrate时,我收到以下错误: Specified ‘postgresql’ for database adapter, but the […]

gem install json失败,重新定义了struct timezone / timespec

我在Windows上使用带有DevKit的Ruby 1.9.3(Win 7 64位上的所有32位)。 现在我尝试安装rails,但是从bundle中获取错误。 如果我试图运行(什么捆绑抱怨) gem install json 我收到以下错误消息: D:\RubyTest>gem install json Temporarily enhancing PATH to include DevKit… Building native extensions. This could take a while… ERROR: Error installing json: ERROR: Failed to build gem native extension. D:/Ruby193/bin/ruby.exe extconf.rb creating Makefile make generating generator-i386-mingw32.def compiling generator.c In file included from d:/Ruby193/include/ruby-1.9.1/ruby/ruby.h:1381:0, from d:/Ruby193/include/ruby-1.9.1/ruby.h:32, from […]

通过CentOS 64位在Ruby 1.9.2中安装rubygem’mysql2’时出现编译器错误

带有Ruby 1.8.7和1.9.2的CentOS 64位服务器 {{没有RVM,需要它没有RVM …目前所有Ruby1.9.2二进制文件都是ruby19并且类似地可访问,因此没有gem-path或任何类型的任何映射}}} 安装gem’mysql2’时出错… 我安装了所有依赖项,并且都是64位版本 … 所有错误都属于{./client.h:13:错误:重新定义typedef’rb_unblock_function_t’} 可能{#warning ruby​​sig.h已过时}是理由吗? 控制台捕获: #gem19 install mysql2 -v 0.2.7 — –with-mysql-dir=/usr/bin –with-mysql-config=/usr/bin/mysql_config –with-mysql-include=/usr/include/mysql Building native extensions. This could take a while… ERROR: Error installing mysql2: ERROR: Failed to build gem native extension. /usr/bin/ruby19 extconf.rb –with-mysql-dir=/usr/bin –with-mysql-config=/usr/bin/mysql_config –with-mysql-include=/usr/include/mysql checking for rb_thread_blocking_region()… no checking for mysql.h… yes checking for […]