0

I have a project which uses PG in ruby on rails and its all working fine. I am now trying to setup a windows development environment for the project. I have bundle install completing, however when I run rails server I get some failures I dont understand.

Please see the output:

E:\ror\andy-hello-world-ruby>rails server
E:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/pg-0.17.1-x86-mingw32/lib/pg.rb:10:in `require': cannot load such file -- 2.1/pg_ex
t (LoadError)
        from E:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/pg-0.17.1-x86-mingw32/lib/pg.rb:10:in `rescue in <top (required)>'
        from E:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/pg-0.17.1-x86-mingw32/lib/pg.rb:3:in `<top (required)>'
        from E:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/bundler-1.7.7/lib/bundler/runtime.rb:76:in `require'
        from E:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/bundler-1.7.7/lib/bundler/runtime.rb:76:in `block (2 levels) in requir
e'
        from E:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/bundler-1.7.7/lib/bundler/runtime.rb:72:in `each'
        from E:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/bundler-1.7.7/lib/bundler/runtime.rb:72:in `block in require'
        from E:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/bundler-1.7.7/lib/bundler/runtime.rb:61:in `each'
        from E:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/bundler-1.7.7/lib/bundler/runtime.rb:61:in `require'
        from E:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/bundler-1.7.7/lib/bundler.rb:133:in `require'
        from E:/ror/andy-hello-world-ruby/config/application.rb:7:in `<top (required)>'
        from E:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/railties-4.1.8/lib/rails/commands/commands_tasks.rb:79:in `require'
        from E:/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 se
rver'
        from E:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/railties-4.1.8/lib/rails/commands/commands_tasks.rb:76:in `tap'
        from E:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/railties-4.1.8/lib/rails/commands/commands_tasks.rb:76:in `server'
        from E:/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
!'
        from E:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/railties-4.1.8/lib/rails/commands.rb:17:in `<top (required)>'
        from bin/rails:8:in `require'
        from bin/rails:8:in `<main>'

E:\ror\andy-hello-world-ruby>bundle install
DL is deprecated, please use Fiddle
Using rake 10.4.1
Using i18n 0.6.11
Using json 1.8.1
Using minitest 5.4.3
Using thread_safe 0.3.4
Using tzinfo 1.2.2
Using activesupport 4.1.8
Using builder 3.2.2
Using erubis 2.7.0
Using actionview 4.1.8
Using rack 1.5.2
Using rack-test 0.6.2
Using actionpack 4.1.8
Using mime-types 2.4.3
Using mail 2.6.3
Using actionmailer 4.1.8
Using activemodel 4.1.8
Using arel 5.0.1.20140414130214
Using activerecord 4.1.8
Using coffee-script-source 1.8.0
Using execjs 2.2.2
Using coffee-script 2.3.0
Using thor 0.19.1
Using railties 4.1.8
Using coffee-rails 4.0.1
Using commonjs 0.2.7
Using hike 1.2.3
Using multi_json 1.10.1
Using jbuilder 2.2.5
Using jquery-rails 3.1.2
Using less 2.6.0
Using less-rails 2.6.0
Using pg 0.17.1
Using bundler 1.7.7
Using tilt 1.4.1
Using sprockets 2.12.3
Using sprockets-rails 2.2.2
Using rails 4.1.8
Using rdoc 4.1.2
Using sass 3.2.19
Using sass-rails 4.0.5
Using sdoc 0.4.1
Using spring 1.2.0
Using turbolinks 2.5.2
Using twitter-bootstrap-rails 3.2.0
Using uglifier 2.5.3
Your bundle is complete!
Gems in the group production were not installed.
Use `bundle show [gemname]` to see where a bundled gem is installed.

E:\ror\andy-hello-world-ruby>

Please can anybody offer any guidance?

RenegadeAndy
  • 5,440
  • 18
  • 70
  • 130
  • There are no answers on that - and I have tried each of the suggestions – RenegadeAndy Jan 25 '15 at 20:28
  • There are multiple answers there. Just because it hasn't been marked as an answer, doesn't mean it won't work. Did you install the `pg` gem after installing postgres on your windows machine? – Justin Wood Jan 25 '15 at 20:31
  • read this: http://stackoverflow.com/questions/27321017/active-support-dependencies-rb247-require-cannot-load-such-file-2-1-pg-ex, you need newer version of pg – kasperite Jan 25 '15 at 20:42

0 Answers0