Unable to start rails server after installing pg gem -


i having problem after installed pg gem postgresql using this:

subst x: "c:\program files (x86)\postgresql\9.4" gem install pg -- --with-pg-dir=x: subst x: /d 

after when try 'rails s' command this

    $ rails s     c:/railsinstaller/ruby2.1.0/lib/ruby/gems/2.1.0/gems/pg- 0.18.2/lib/pg.rb:14:in ` require': cannot load such file -- 2.1/pg_ext (loaderror)         c:/railsinstaller/ruby2.1.0/lib/ruby/gems/2.1.0/gems/pg-0.18.2/lib/ pg.rb:14:in `rescue in <top (required)>'         c:/railsinstaller/ruby2.1.0/lib/ruby/gems/2.1.0/gems/pg-0.18.2/lib/ pg.rb:3:in `<top (required)>'         c:/railsinstaller/ruby2.1.0/lib/ruby/gems/2.1.0/gems/bundler-1.10.5 /lib/bundler/runtime.rb:76:in `require'         c:/railsinstaller/ruby2.1.0/lib/ruby/gems/2.1.0/gems/bundler-1.10.5 /lib/bundler/runtime.rb:76:in `block (2 levels) in require'         c:/railsinstaller/ruby2.1.0/lib/ruby/gems/2.1.0/gems/bundler-1.10.5 /lib/bundler/runtime.rb:72:in `each'         c:/railsinstaller/ruby2.1.0/lib/ruby/gems/2.1.0/gems/bundler-1.10.5 /lib/bundler/runtime.rb:72:in `block in require'         c:/railsinstaller/ruby2.1.0/lib/ruby/gems/2.1.0/gems/bundler-1.10.5 /lib/bundler/runtime.rb:61:in `each'         c:/railsinstaller/ruby2.1.0/lib/ruby/gems/2.1.0/gems/bundler-1.10.5 /lib/bundler/runtime.rb:61:in `require'         c:/railsinstaller/ruby2.1.0/lib/ruby/gems/2.1.0/gems/bundler-1.10.5 /lib/bundler.rb:134:in `require'         c:/sites/myblog/config/application.rb:7:in `<top (required)>'         c:/railsinstaller/ruby2.1.0/lib/ruby/gems/2.1.0/gems/railties-4.1.8 /lib/rails/commands/commands_tasks.rb:79:in `require'         c:/railsinstaller/ruby2.1.0/lib/ruby/gems/2.1.0/gems/railties-4.1.8 /lib/rails/commands/commands_tasks.rb:79:in `block in server'         c:/railsinstaller/ruby2.1.0/lib/ruby/gems/2.1.0/gems/railties-4.1.8 /lib/rails/commands/commands_tasks.rb:76:in `tap'         c:/railsinstaller/ruby2.1.0/lib/ruby/gems/2.1.0/gems/railties-4.1.8 /lib/rails/commands/commands_tasks.rb:76:in `server'         c:/railsinstaller/ruby2.1.0/lib/ruby/gems/2.1.0/gems/railties-4.1.8 /lib/rails/commands/commands_tasks.rb:40:in `run_command!'         c:/railsinstaller/ruby2.1.0/lib/ruby/gems/2.1.0/gems/railties-4.1.8 /lib/rails/commands.rb:17:in `<top (required)>'         bin/rails:4:in `require'         bin/rails:4:in `<main>'  imran@imran-pc /c/sites/myblog $ 

plus have commented gem 'sqlite3' , added gem 'pg' in gemfile.

any appreciated

try uninstall "pg" gem:

gem uninstall pg 

then run bundle (assuming gemfile contains "pg" gem):

bundle 

Comments

Popular posts from this blog

javascript - Using jquery append to add option values into a select element not working -

Android soft keyboard reverts to default keyboard on orientation change -

Rendering JButton to get the JCheckBox behavior in a JTable by using images does not update my table -