0

Sempre que crio um projeto(do zero) em seguida dou o comado rails db:create para criar o banco me apareçe esse erro:

 LoadError: /var/lib/gems/2.3.0/gems/pg-1.1.0/lib/pg_ext.so: undefined symbol: rb_enc_alias - /var/lib/gems/2.3.0/gems/pg-1.1.0/lib/pg_ext.so
/var/lib/gems/2.3.0/gems/pg-1.1.0/lib/pg.rb:4:in `require'
/var/lib/gems/2.3.0/gems/pg-1.1.0/lib/pg.rb:4:in `<top (required)>'
/var/lib/gems/2.3.0/gems/bundler-1.16.1/lib/bundler/runtime.rb:81:in `require'
/var/lib/gems/2.3.0/gems/bundler-1.16.1/lib/bundler/runtime.rb:81:in `block (2 levels) in require'
/var/lib/gems/2.3.0/gems/bundler-1.16.1/lib/bundler/runtime.rb:76:in `each'
/var/lib/gems/2.3.0/gems/bundler-1.16.1/lib/bundler/runtime.rb:76:in `block in require'
/var/lib/gems/2.3.0/gems/bundler-1.16.1/lib/bundler/runtime.rb:65:in `each'
/var/lib/gems/2.3.0/gems/bundler-1.16.1/lib/bundler/runtime.rb:65:in `require'
/var/lib/gems/2.3.0/gems/bundler-1.16.1/lib/bundler.rb:114:in `require'
/home/diego_souza/Área de Trabalho/app/config/application.rb:7:in `<top (required)>'
/home/diego_souza/Área de Trabalho/app/Rakefile:4:in `require_relative'
/home/diego_souza/Área de Trabalho/app/Rakefile:4:in `<top (required)>'
/var/lib/gems/2.3.0/gems/railties-5.1.6/lib/rails/commands/rake/rake_command.rb:20:in `block in perform'
/var/lib/gems/2.3.0/gems/railties-5.1.6/lib/rails/commands/rake/rake_command.rb:18:in `perform'
/var/lib/gems/2.3.0/gems/railties-5.1.6/lib/rails/command.rb:46:in `invoke'
/var/lib/gems/2.3.0/gems/railties-5.1.6/lib/rails/commands.rb:16:in `<top (required)>'
/home/diego_souza/Área de Trabalho/app/bin/rails:9:in `require'
/home/diego_souza/Área de Trabalho/app/bin/rails:9:in `<top (required)>'
/var/lib/gems/2.3.0/gems/spring-2.0.2/lib/spring/client/rails.rb:28:in `load'
/var/lib/gems/2.3.0/gems/spring-2.0.2/lib/spring/client/rails.rb:28:in `call'
/var/lib/gems/2.3.0/gems/spring-2.0.2/lib/spring/client/command.rb:7:in `call'
/var/lib/gems/2.3.0/gems/spring-2.0.2/lib/spring/client.rb:30:in `run'
/var/lib/gems/2.3.0/gems/spring-2.0.2/bin/spring:49:in `<top (required)>'
/var/lib/gems/2.3.0/gems/spring-2.0.2/lib/spring/binstub.rb:31:in `load'
/var/lib/gems/2.3.0/gems/spring-2.0.2/lib/spring/binstub.rb:31:in `<top (required)>'
/home/diego_souza/Área de Trabalho/app/bin/spring:15:in `<top (required)>'
bin/rails:3:in `load'
bin/rails:3:in `<main>'
(See full trace by running task with --trace)

desde ja agradeço!!!!

2
  • vc deu antes bundle install? depois viu se no seu gem file tem a gem 'pg'? Commented 30/08/2018 às 16:53
  • 2
    sim, deu o bundle install, a gem 'pg' estava no gemfile não consegui tirar o erro então desinstalei td e reinstalei td o ambiente RoR agora ta tudo funfando de boa. vlw!!!!! Commented 30/08/2018 às 19:16

0

Você deve fazer log-in para responder a esta pergunta.

Pesquise outras perguntas com a tag .