#1 楼 @i5ting Gemfile 的内容如下: source "http://rubygems.org"
gem 'sinatra' gem 'oauth2' gem 'pry' gem 'redcarpet'
#6 楼 @mjf429 我也想要,求一份啊![email protected] 谢谢了!
#3 楼 @funfriend 你还记得,当初是怎么解决这个问题的么?我用的是 fedora 的系统,不能 yum install libpq-dev ,所以,我也没有找到 pg_config.
#5 楼 @huacnlee 服务器经常出现这种情况么?现在好了么? 我现在运行,出现的结果是:
Building native extensions. This could take a while... ERROR: Error installing pg: ERROR: Failed to build gem native extension.
/usr/local/bin/ruby extconf.rb checking for pg_config... no No pg_config... trying anyway. If building fails, please try again with --with-pg-config=/path/to/pg_config checking for libpq-fe.h... no Can't find the 'libpq-fe.h header *** extconf.rb failed *** Could not create Makefile due to some reason, probably lack of necessary libraries and/or headers. Check the mkmf.log file for more details. You may need configuration options.
Provided configuration options: --with-opt-dir --with-opt-include --without-opt-include=${opt-dir}/include --with-opt-lib --without-opt-lib=${opt-dir}/lib --with-make-prog --without-make-prog --srcdir=. --curdir --ruby=/usr/local/bin/ruby --with-pg
你说的服务器,指的是 rubygems 或 taobao.org 源么?
#2 楼 @zhangyuxiu 先运行 gem install 后,出现下列结果:从 Fetching 可以看出,貌似已经找到了要安装的包。 #gem install pg -v '0.11.0' Fetching: pg-0.11.0.gem (100%) ERROR: While executing gem ... (Gem::FilePermissionError) You don't have write permissions into the /usr/local/lib/ruby/gems/1.9.1 directory.
由于权限不够,我以 root 用户重新执行后,仍是得到下面结果:
ERROR: While executing gem ... (Zlib::GzipFile::Error) not in gzip format
我猜想出现这个错误,是不是跟源是没有关系的啊?
#1 楼 @googya 我将 Gemfile 的头一行语句换成了:source 'http://ruby.taobao.org'
bundle install 后,出现下面的错误:
Fetching gem metadata from http://ruby.taobao.org/.
Fetching full source index from http://ruby.taobao.org/
Unfortunately, a fatal error has occurred. Please see the Bundler
troubleshooting documentation at http://bit.ly/bundler-issues. Thanks!
/usr/local/lib/ruby/site_ruby/1.9.1/rubygems.rb:543:in initialize': not in gzip format (Zlib::GzipFile::Error)
from /usr/local/lib/ruby/site_ruby/1.9.1/rubygems.rb:543:in
new'
from /usr/local/lib/ruby/site_ruby/1.9.1/rubygems.rb:543:in `gunzip'
貌似还是上面类似的错误。
#4 楼 @woaigithub 那么,请您详述下吧。非常感谢啊!
您好,向您请教:<%= form_tag sessions_path do %> 这句是什么意思啊?