Please forgive my ignorance. I'm having issues raking my database on heroku. When I run :
heroku run rake db:migrate
I get
rake aborted!
LoadError: cannot load such file -- ffaker
/app/vendor/bundle/ruby/1.9.1/gems/activesupport-4.1.7/lib/active_support/depend
encies.rb:247:in `require'
/app/vendor/bundle/ruby/1.9.1/gems/activesupport-4.1.7/lib/active_support/depend
encies.rb:247:in `block in require'
/app/vendor/bundle/ruby/1.9.1/gems/activesupport-4.1.7/lib/active_support/depend
encies.rb:232:in `load_dependency'
/app/vendor/bundle/ruby/1.9.1/gems/activesupport-4.1.7/lib/active_support/depend
encies.rb:247:in `require'
/app/lib/tasks/seed.rake:1:in `<top (required)>'
/app/vendor/bundle/ruby/1.9.1/gems/activesupport-4.1.7/lib/active_support/depend
encies.rb:241:in `load'
/app/vendor/bundle/ruby/1.9.1/gems/activesupport-4.1.7/lib/active_support/depend
encies.rb:241:in `block in load'
/app/vendor/bundle/ruby/1.9.1/gems/activesupport-4.1.7/lib/active_support/depend
encies.rb:232:in `load_dependency'
/app/vendor/bundle/ruby/1.9.1/gems/activesupport-4.1.7/lib/active_support/depend
encies.rb:241:in `load'
/app/vendor/bundle/ruby/1.9.1/gems/railties-4.1.7/lib/rails/engine.rb:654:in `bl
ock in run_tasks_blocks'
/app/vendor/bundle/ruby/1.9.1/gems/railties-4.1.7/lib/rails/engine.rb:654:in `ea
ch'
/app/vendor/bundle/ruby/1.9.1/gems/railties-4.1.7/lib/rails/engine.rb:654:in `ru
n_tasks_blocks'
/app/vendor/bundle/ruby/1.9.1/gems/railties-4.1.7/lib/rails/application.rb:384:i
n `run_tasks_blocks'
/app/vendor/bundle/ruby/1.9.1/gems/railties-4.1.7/lib/rails/engine.rb:449:in `lo
ad_tasks'
/app/vendor/bundle/ruby/1.9.1/gems/railties-4.1.7/lib/rails/railtie.rb:194:in `p
ublic_send'
/app/vendor/bundle/ruby/1.9.1/gems/railties-4.1.7/lib/rails/railtie.rb:194:in `m
ethod_missing'
/app/Rakefile:6:in `<top (required)>'
(See full trace by running task with --trace)
I've tried following the solutions from heroku rake db:migrate > no such file to load -- faker with no luck. I really am not sure where else to go from here. I would greatly appreciate any help. Thanks.
You should specify this in your code:
require 'ffaker'
Also, make sure you have ffaker in the right gem group. I was setting up a staging environment and wanted to load dummy data and forgot ffaker was only in development and testing environment groups.
I was using the git URL to add ffaker in my Gemfile. I removed this URL, run bundle again and everything works ok now.
- gem 'ffaker', '~>2.10.0', git: 'https://github.com/ffaker/ffaker.git'
+ gem 'ffaker', '~>2.10.0'
Related
I have a Rails 5 app and just added the following line to my Gemfile:
gem 'evergreen', require: 'evergreen/rails'
After that I run:
bundle
rake
And get the following issues:
Issue #1
Relevant output:
rake aborted!
LoadError: cannot load such file -- rack/showexceptions
/Users/veronicarebagliatte/.rvm/gems/ruby-2.3.1#ticketing_system/gems/activesupport-5.0.0.1/lib/active_support/dependencies.rb:293:in `require'
/Users/veronicarebagliatte/.rvm/gems/ruby-2.3.1#ticketing_system/gems/activesupport-5.0.0.1/lib/active_support/dependencies.rb:293:in `block in require'
/Users/veronicarebagliatte/.rvm/gems/ruby-2.3.1#ticketing_system/gems/activesupport-5.0.0.1/lib/active_support/dependencies.rb:259:in `load_dependency'
/Users/veronicarebagliatte/.rvm/gems/ruby-2.3.1#ticketing_system/gems/activesupport-5.0.0.1/lib/active_support/dependencies.rb:293:in `require'
/Users/veronicarebagliatte/.rvm/gems/ruby-2.3.1#ticketing_system/gems/sinatra-1.0/lib/sinatra/showexceptions.rb:1:in `<top (required)>'
/Users/veronicarebagliatte/.rvm/gems/ruby-2.3.1#ticketing_system/gems/activesupport-5.0.0.1/lib/active_support/dependencies.rb:293:in `require'
/Users/veronicarebagliatte/.rvm/gems/ruby-2.3.1#ticketing_system/gems/activesupport-5.0.0.1/lib/active_support/dependencies.rb:293:in `block in require'
/Users/veronicarebagliatte/.rvm/gems/ruby-2.3.1#ticketing_system/gems/activesupport-5.0.0.1/lib/active_support/dependencies.rb:259:in `load_dependency'
/Users/veronicarebagliatte/.rvm/gems/ruby-2.3.1#ticketing_system/gems/activesupport-5.0.0.1/lib/active_support/dependencies.rb:293:in `require'
/Users/veronicarebagliatte/.rvm/gems/ruby-2.3.1#ticketing_system/gems/sinatra-1.0/lib/sinatra/base.rb:6:in `<top (required)>'
/Users/veronicarebagliatte/.rvm/gems/ruby-2.3.1#ticketing_system/gems/activesupport-5.0.0.1/lib/active_support/dependencies.rb:293:in `require'
/Users/veronicarebagliatte/.rvm/gems/ruby-2.3.1#ticketing_system/gems/activesupport-5.0.0.1/lib/active_support/dependencies.rb:293:in `block in require'
/Users/veronicarebagliatte/.rvm/gems/ruby-2.3.1#ticketing_system/gems/activesupport-5.0.0.1/lib/active_support/dependencies.rb:259:in `load_dependency'
/Users/veronicarebagliatte/.rvm/gems/ruby-2.3.1#ticketing_system/gems/activesupport-5.0.0.1/lib/active_support/dependencies.rb:293:in `require'
/Users/veronicarebagliatte/.rvm/gems/ruby-2.3.1#ticketing_system/gems/evergreen-0.3.0/lib/evergreen.rb:2:in `<top (required)>'
I've 'fixed' this by using sinatra's master branch (currently at 2.0.0.beta2)
gem 'sinatra', git: 'https://github.com/sinatra/sinatra.git'
Issue #2:
Relevant output:
rake aborted!
LoadError: cannot load such file -- capybara/wait_until
/Users/veronicarebagliatte/.rvm/gems/ruby-2.3.1#ticketing_system/gems/activesupport-5.0.0.1/lib/active_support/dependencies.rb:293:in `require'
/Users/veronicarebagliatte/.rvm/gems/ruby-2.3.1#ticketing_system/gems/activesupport-5.0.0.1/lib/active_support/dependencies.rb:293:in `block in require'
/Users/veronicarebagliatte/.rvm/gems/ruby-2.3.1#ticketing_system/gems/activesupport-5.0.0.1/lib/active_support/dependencies.rb:259:in `load_dependency'
/Users/veronicarebagliatte/.rvm/gems/ruby-2.3.1#ticketing_system/gems/activesupport-5.0.0.1/lib/active_support/dependencies.rb:293:in `require'
/Users/veronicarebagliatte/.rvm/gems/ruby-2.3.1#ticketing_system/gems/evergreen-0.3.0/lib/evergreen.rb:4:in `<top (required)>'
Thing is wait_until has been removed from capybara.
Please note I'm not proceeding with evergreen actual usage just yet, all I want is to install it successfully for now. In other words, I want to be able to run rake without getting any errors.
Has someone else experienced the same issues? Is there anything I'm missing or should I just fork the gem and try to fix them?
From your error log you can see that you're project is using evergreen v0.3.0 (because its sinatra restriction was the last one that would allow 2+), whereas the current version of evergreen is v1.2.0 - You need to lock your version of evergreen in your Gemfile to >=1.2.0 and then see what other dependence issues you have.
You'll have at least a dependence issue with sinatra since the 1.2.0 version of evergreen requires sinatra ~> 1.1 whereas the current master branch allows >= 1.1. To use the master branch of evergreen in your project specify
gem 'evergreen', github: 'abepetrillo/evergreen', require: 'evergreen/rails'
in your Gemfile
Yes wait_until has removed with capybara2.0 check this updates. You should remove require "capybara/wait_until" for success.
This is my first time learning to code, first time on Linux and first time on stackeroverflow so I dont know if its glaringly obvious where I have gone wrong.
I have followed this guide https://gorails.com/setup/ubuntu/16.04 and everything was working as the guide said until I got to this section:
run bundle install --local
/usr/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in require': cannot load such file -- bundler (LoadError)
from /usr/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:inrequire'
from /usr/lib/ruby/vendor_ruby/rails/generators/app_base.rb:328:in bundle_command'
from /usr/lib/ruby/vendor_ruby/rails/generators/app_base.rb:344:inrun_bundle'
from (eval):1:in run_bundle'
from /usr/lib/ruby/vendor_ruby/thor/command.rb:27:inrun'
from /usr/lib/ruby/vendor_ruby/thor/invocation.rb:126:in invoke_command'
from /usr/lib/ruby/vendor_ruby/thor/invocation.rb:133:inblock in invoke_all'
from /usr/lib/ruby/vendor_ruby/thor/invocation.rb:133:in each'
from /usr/lib/ruby/vendor_ruby/thor/invocation.rb:133:inmap'
from /usr/lib/ruby/vendor_ruby/thor/invocation.rb:133:in invoke_all'
from /usr/lib/ruby/vendor_ruby/thor/group.rb:232:indispatch'
from /usr/lib/ruby/vendor_ruby/thor/base.rb:440:in start'
from /usr/lib/ruby/vendor_ruby/rails/commands/application.rb:17:in'
from /usr/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in require'
from /usr/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:inrequire'
from /usr/lib/ruby/vendor_ruby/rails/cli.rb:14:in <top (required)>'
from /usr/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:inrequire'
from /usr/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in require'
from /usr/bin/rails:9:in'
tom#Laptop:~$ cd myapp
tom#Laptop:~/myapp$ rake db:create
rake aborted!
LoadError: cannot load such file -- bundler/setup
/home/tom/myapp/config/boot.rb:3:in <top (required)>'
/home/tom/myapp/config/application.rb:1:in'
/home/tom/myapp/Rakefile:4:in <top (required)>'
(See full trace by running task with --trace)
tom#Laptop:~/myapp$ rails server
/usr/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:inrequire': cannot load such file -- bundler/setup (LoadError)
from /usr/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in require'
from /home/tom/myapp/config/boot.rb:3:in'
from bin/rails:3:in require_relative'
from bin/rails:3:in'
Sorry I don't know how to format this correctly.
When I visit localhost:3000 I just get Network error.
Has anyone got any idea how to solve this? Thanks for your time.
Try gem install bundler. After that use bundle install in terminal.
I've been working on a Ruby on Rails project for class and have run into some problems. When I run bundle install, all of my gems install appropriately. When I run rake db:setup, I get the following error.
tuggernuts2#tn-Extensa5620:~/Workspace/Class/baseball-manager$ rake db:setup
rake aborted!
cannot load such file -- ./bundler/setup
/home/tuggernuts2/Workspace/Class/baseball-manager/config/boot.rb:6:in `<top (required)>'
/home/tuggernuts2/Workspace/Class/baseball-manager/config/application.rb:1:in `<top (required)>'
/home/tuggernuts2/Workspace/Class/baseball-manager/Rakefile:5:in `<top (required)>'
(See full trace by running task with --trace)
I am also get this error when I try to run any of my unit tests:
tuggernuts2#tn-Extensa5620:~/Workspace/Class/baseball-manager$ ruby test/unit/user_test.rb
/usr/lib/ruby/1.9.1/rubygems/custom_require.rb:60:in `require': cannot load such file -- ./bundler/setup (LoadError)
from /usr/lib/ruby/1.9.1/rubygems/custom_require.rb:60:in `rescue in require'
from /usr/lib/ruby/1.9.1/rubygems/custom_require.rb:35:in `require'
from /home/tuggernuts2/Workspace/Class/baseball-manager/config/boot.rb:6:in `<top (required)>'
from /usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
from /usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
from /home/tuggernuts2/Workspace/Class/baseball-manager/config/application.rb:1:in `<top (required)>'
from /usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
from /usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
from /home/tuggernuts2/Workspace/Class/baseball-manager/config/environment.rb:2:in `<top (required)>'
from /usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
from /usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
from /home/tuggernuts2/Workspace/Class/baseball-manager/test/test_helper.rb:2:in `<top (required)>'
from test/unit/user_test.rb:2:in `require_relative'
from test/unit/user_test.rb:2:in `<main>'
I'm working on this project with a group of 4 others, and no one else is getting these errors so I infer that the problem is with my setup and not with the code.
I'm running ruby version "ruby 1.9.3p194 (2012-04-20 revision 35410) [x86_64-linux]"
I'm running ruby gems version 1.8.23
I'm running rails version 3.2.5
but when I run rails -v I get the same require error, and the same ./bundler/setup error as above. I've been googling these problems for awhile and non of the solutions I've found so far have helped.
I've tried re-installing gems, I've tried running gem update -system, but that just gives me:
ERROR: While executing gem ... (RuntimeError)
gem update --system is disabled on Debian, because it will overwrite the content of the rubygems Debian package, and might break your Debian system in subtle ways. The Debian-supported way to update rubygems is through apt-get, using Debian official repositories.
If you really know what you are doing, you can still update rubygems by setting the REALLY_GEM_UPDATE_SYSTEM environment variable, but please remember that this is completely unsupported by Debian.
The rake errors are new as of yesterday, the ruby require errors have been there pretty much since the beginning. Life has been a struggle.
I've tried a bunch of combinations of require, require "./...", require_relative, and nothing seems to fix the require errors.
Any and all help is appreciated. Thanks in advance.
Edit: Output from: bundle exec rake db:setup --trace
tuggernuts2#tn-Extensa5620:~/Workspace/Class/baseball-manager$ bundle exec rake db:setup --trace
rake aborted!
cannot load such file -- ./bundler/setup
/home/tuggernuts2/Workspace/Class/baseball-manager/config/boot.rb:7:in `require'
/home/tuggernuts2/Workspace/Class/baseball-manager/config/boot.rb:7:in `<top (required)>'
/home/tuggernuts2/Workspace/Class/baseball-manager/config/application.rb:1:in `require'
/home/tuggernuts2/Workspace/Class/baseball-manager/config/application.rb:1:in `<top (required)>'
/home/tuggernuts2/Workspace/Class/baseball-manager/Rakefile:5:in `require'
/home/tuggernuts2/Workspace/Class/baseball-manager/Rakefile:5:in `<top (required)>'
/var/lib/gems/1.9.1/gems/rake-10.0.3/lib/rake/rake_module.rb:25:in `load'
/var/lib/gems/1.9.1/gems/rake-10.0.3/lib/rake/rake_module.rb:25:in `load_rakefile'
/var/lib/gems/1.9.1/gems/rake-10.0.3/lib/rake/application.rb:583:in `raw_load_rakefile'
/var/lib/gems/1.9.1/gems/rake-10.0.3/lib/rake/application.rb:89:in `block in load_rakefile'
/var/lib/gems/1.9.1/gems/rake-10.0.3/lib/rake/application.rb:160:in `standard_exception_handling'
/var/lib/gems/1.9.1/gems/rake-10.0.3/lib/rake/application.rb:88:in `load_rakefile'
/var/lib/gems/1.9.1/gems/rake-10.0.3/lib/rake/application.rb:72:in `block in run'
/var/lib/gems/1.9.1/gems/rake-10.0.3/lib/rake/application.rb:160:in `standard_exception_handling'
/var/lib/gems/1.9.1/gems/rake-10.0.3/lib/rake/application.rb:70:in `run'
/var/lib/gems/1.9.1/gems/rake-10.0.3/bin/rake:33:in `<top (required)>'
/usr/local/bin/rake:23:in `load'
/usr/local/bin/rake:23:in `<main>'
I get this error when i try to run "rake test":
avery#ubuntu:~/rails_projects/depot$ rake test
rake aborted!
You have already activated rake 10.0.1, but your Gemfile requires rake 10.0.0. Using bundle exec may solve this.
/home/avery/.rvm/gems/ruby-1.9.3-p327/gems/bundler-1.2.2/lib/bundler/runtime.rb:31:in `block in setup'
/home/avery/.rvm/gems/ruby-1.9.3-p327/gems/bundler-1.2.2/lib/bundler/runtime.rb:17:in `setup'
/home/avery/.rvm/gems/ruby-1.9.3-p327/gems/bundler-1.2.2/lib/bundler.rb:116:in `setup'
/home/avery/.rvm/gems/ruby-1.9.3-p327/gems/bundler-1.2.2/lib/bundler/setup.rb:7:in `<top (required)>'
/home/avery/rails_projects/depot/config/boot.rb:6:in `<top (required)>'
/home/avery/rails_projects/depot/config/application.rb:1:in `<top (required)>'
/home/avery/rails_projects/depot/Rakefile:5:in `<top (required)>'
(See full trace by running task with --trace)
when i try running "bundle exec rake" i get:
rake aborted!
Could not find a JavaScript runtime. See https://github.com/sstephenson/execjs for a list of available runtimes.
/home/avery/.rvm/gems/ruby-1.9.3-p327/gems/execjs-1.4.0/lib/execjs/runtimes.rb:51:in `autodetect'
/home/avery/.rvm/gems/ruby-1.9.3-p327/gems/execjs-1.4.0/lib/execjs.rb:5:in `<module:ExecJS>'
/home/avery/.rvm/gems/ruby-1.9.3-p327/gems/execjs-1.4.0/lib/execjs.rb:4:in `<top (required)>'
/home/avery/.rvm/gems/ruby-1.9.3-p327/gems/coffee-script-2.2.0/lib/coffee_script.rb:1:in `require'
/home/avery/.rvm/gems/ruby-1.9.3-p327/gems/coffee-script-2.2.0/lib/coffee_script.rb:1:in `<top (required)>'
/home/avery/.rvm/gems/ruby-1.9.3-p327/gems/coffee-script-2.2.0/lib/coffee-script.rb:1:in `require'
/home/avery/.rvm/gems/ruby-1.9.3-p327/gems/coffee-script-2.2.0/lib/coffee-script.rb:1:in `<top (required)>'
/home/avery/.rvm/gems/ruby-1.9.3-p327/gems/coffee-rails-3.2.2/lib/coffee-rails.rb:1:in `require'
/home/avery/.rvm/gems/ruby-1.9.3-p327/gems/coffee-rails-3.2.2/lib/coffee-rails.rb:1:in `<top (required)>'
/home/avery/.rvm/gems/ruby-1.9.3-p327/gems/bundler-1.2.2/lib/bundler/runtime.rb:68:in `require'
/home/avery/.rvm/gems/ruby-1.9.3-p327/gems/bundler-1.2.2/lib/bundler/runtime.rb:68:in `block (2 levels) in require'
/home/avery/.rvm/gems/ruby-1.9.3-p327/gems/bundler-1.2.2/lib/bundler/runtime.rb:66:in `each'
/home/avery/.rvm/gems/ruby-1.9.3-p327/gems/bundler-1.2.2/lib/bundler/runtime.rb:66:in `block in require'
/home/avery/.rvm/gems/ruby-1.9.3-p327/gems/bundler-1.2.2/lib/bundler/runtime.rb:55:in `each'
/home/avery/.rvm/gems/ruby-1.9.3-p327/gems/bundler-1.2.2/lib/bundler/runtime.rb:55:in `require'
/home/avery/.rvm/gems/ruby-1.9.3-p327/gems/bundler-1.2.2/lib/bundler.rb:128:in `require'
/home/avery/rails_projects/depot/config/application.rb:7:in `<top (required)>'
/home/avery/rails_projects/depot/Rakefile:5:in `require'
/home/avery/rails_projects/depot/Rakefile:5:in `<top (required)>'
(See full trace by running task with --trace)
how can i fix this?
You probably have rake 10.0.0 in your Gemfile.lock.
Removing Gemfile.lock might solve the problem.
For the first part of the question: I ran into the same problem and solved it with a:
gem regenerate_binstubs
after that
gem -V
reveals 10.0.0 again.
Answer of 1st query
In your Gemfile, explicitly set the latest rake version by
gem 'rake', '~> 10.0.1'
And then run
$ bundle update rake
Answer of 2nd query
put this in your Gemfile and run bundle install
gem 'therubyracer'
For the second part of the question, you just need to add this to your Gemfile:
gem 'therubyracer'
If you've specified a rake version in your Gemfile that your project requires, eg:
gem 'rake', '~> 10.0.0'
Try installing it again
bundle install
I finally got the gem pg to install. Now when I go to migrate the database I get the following:
$ rake db:migrate
(in c:/rubyDev/bsbaslic)
rake aborted!
no such file to load -- 1.9/pg_ext
c:/Ruby192/lib/ruby/gems/1.9.1/gems/pg-0.10.0/lib/pg.rb:10:in `require'
c:/Ruby192/lib/ruby/gems/1.9.1/gems/pg-0.10.0/lib/pg.rb:10:in `<top (required)>'
c:/Ruby192/lib/ruby/gems/1.9.1/gems/bundler-1.0.3/lib/bundler/runtime.rb:64:in `require'
c:/Ruby192/lib/ruby/gems/1.9.1/gems/bundler-1.0.3/lib/bundler/runtime.rb:64:in `block (2 levels) in require'
c:/Ruby192/lib/ruby/gems/1.9.1/gems/bundler-1.0.3/lib/bundler/runtime.rb:62:in `each'
c:/Ruby192/lib/ruby/gems/1.9.1/gems/bundler-1.0.3/lib/bundler/runtime.rb:62:in `block in require'
c:/Ruby192/lib/ruby/gems/1.9.1/gems/bundler-1.0.3/lib/bundler/runtime.rb:51:in `each'
c:/Ruby192/lib/ruby/gems/1.9.1/gems/bundler-1.0.3/lib/bundler/runtime.rb:51:in `require'
c:/Ruby192/lib/ruby/gems/1.9.1/gems/bundler-1.0.3/lib/bundler.rb:112:in `require'
c:/rubyDev/bsbaslic/config/application.rb:7:in `<top (required)>'
<internal:lib/rubygems/custom_require>:29:in `require'
<internal:lib/rubygems/custom_require>:29:in `require'
c:/rubyDev/bsbaslic/Rakefile:4:in `<top (required)>'
c:/Ruby192/lib/ruby/1.9.1/rake.rb:2373:in `load'
c:/Ruby192/lib/ruby/1.9.1/rake.rb:2373:in `raw_load_rakefile'
c:/Ruby192/lib/ruby/1.9.1/rake.rb:2007:in `block in load_rakefile'
c:/Ruby192/lib/ruby/1.9.1/rake.rb:2058:in `standard_exception_handling'
c:/Ruby192/lib/ruby/1.9.1/rake.rb:2006:in `load_rakefile'
c:/Ruby192/lib/ruby/1.9.1/rake.rb:1991:in `run'
c:/Ruby192/bin/rake:31:in `<main>'
Does anybody have any ideas as to what it is looking for? I have a pg_ext.so file in the same directory as pg.rb.
Windows programs cannot load .so files - they load .dll files instead. You need a build of pg compiled for Windows, or you need to be running Ruby from within a Linuxy environment such as msys or cygwin.
The problem is in your version of pg gem. There is a special version for windows pg 0.9.0.
In order to have it workingon windows:
uninstall the current pg 0.10.0
install pg as follows: gem install pg --version=0.9.0 -- --with-pg-config=/short/path/to/postresql/bin
(To get short path you can simply change directory to PostgrSQL bin and then type command in cmd, it will automaticaly change path to a short verison)
Then edit your project Gemfile in order to use correct pg gem version (0.9.0)
And that's it.
Good Luck