Solucionado (ver solução)
Solucionado
(ver solução)
5
respostas

Erro ao dar bundle install - 1 aula

Eu fiz primeiramente um git clone e segui os passos indicados para a instação da aplicação com o boostrap. Como não funcionou, levantei a hipotese de ter feito algo errado, e fui refazer os passos do zero.

Só que agora quando dou 'bundle install', retorna o seguinte erro:

Gem::Ext::BuildError: ERROR: Failed to build gem native extension.

/Users/gregory.lopes/.rbenv/versions/2.1.2/bin/ruby -r ./siteconf20141030-53378-a1ffyi.rb 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 --without-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=/Users/gregory.lopes/.rbenv/versions/2.1.2/bin/ruby --with-pg --without-pg --with-pg-dir --without-pg-dir --with-pg-include --without-pg-include=${pg-dir}/include --with-pg-lib --without-pg-lib=${pg-dir}/lib --with-pg-config --without-pg-config --with-pg_config --without-pg_config

extconf failed, exit code 1

Gem files will remain installed in /Users/gregory.lopes/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/pg-0.14.0 for inspection. Results logged to /Users/gregory.lopes/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/extensions/x86_64-darwin-13/2.1.0-static/pg-0.14.0/gem_make.out

Alguma idéia?

5 respostas

Gregory,

Está dando erro na instalação da gem do postgres. Quando você rodou o 'bundle install', ele tentou instalar tudo, inclusive as gems que estão marcadas com production.

Para não dar este problema, rode novamente passando a opção --without production conforme abaixo:

bundle install --without production

Isso mesmo.

Ok, funcionou blz. mas a duvida inicial ainda persiste.

Rodei um rake db:create db:migrate, e ele acusou problema com a versao do rake. Depois de atualizar o rake com bundle update rake, ele criou os bancos perfeitamente.

Mas... o bootstrap continua nao funcionando =/

O CSS está assim (/assets/application.css?body=1):

/*
 * This is a manifest file that'll be compiled into application.css, which will include all the files
 * listed below.
 *
 * Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets,
 * or vendor/assets/stylesheets of plugins, if any, can be referenced here using a relative path.
 *
 * You're free to add application-wide styles to this file and they'll appear at the top of the
 * compiled file, but it's generally better to create a new file per style scope.
 *
 *= require bootstrap
 *= require_self
 *= require_tree .
 */
/* line 16, ../../app/assets/stylesheets/application.css.scss */
body {
  padding-top: 60px;
}

/* Twitter Bootstrap overrides with proper image paths */
/* line 22, ../../app/assets/stylesheets/application.css.scss */
[class^="icon-"],
[class*=" icon-"] {
  background-image: url(/assets/bootstrap/glyphicons-halflings.png);
}

/* line 38, ../../app/assets/stylesheets/application.css.scss */
.icon-white,
.nav-tabs > .active > a > [class^="icon-"],
.nav-tabs > .active > a > [class*=" icon-"],
.nav-pills > .active > a > [class^="icon-"],
.nav-pills > .active > a > [class*=" icon-"],
.nav-list > .active > a > [class^="icon-"],
.nav-list > .active > a > [class*=" icon-"],
.navbar-inverse .nav > .active > a > [class^="icon-"],
.navbar-inverse .nav > .active > a > [class*=" icon-"],
.dropdown-menu > li > a:hover > [class^="icon-"],
.dropdown-menu > li > a:hover > [class*=" icon-"],
.dropdown-menu > .active > a > [class^="icon-"],
.dropdown-menu > .active > a > [class*=" icon-"] {
  background-image: url("bootstrap/glyphicons-halflings-white.png");
}

Aparentemente está dando erro nas linhas 16, 22 e 38 do arquivo, mas não consigo entender o porque, visto que a linha 16 é um padding top de 60px no body.

Gregory,

Qual o erro que aparece?

solução!

resolvida a questão.

foi só colocar um

@import "bootstrap"

antes de padding-top do body.