Thursday, 15 July 2010

postgresql - Could not find gem 'pg (~> 0.17.1) ruby' in the gems available on this machine -



postgresql - Could not find gem 'pg (~> 0.17.1) ruby' in the gems available on this machine -

just upgraded to:

rails', '4.1.7 ruby 2.0.0p481 (2014-05-08 revision 45883) [universal.x86_64-darwin14] rvm 1.26.0

and when seek

$rails s

i error:

could not find gem 'pg (~> 0.17.1) ruby' in gems available on machine.

this gemfile

gem 'rails', '4.1.7' grouping :development, :test gem 'sqlite3' end grouping :production gem 'pg', '~> 0.17.1' gem 'rails_12factor' end ...

i have tried:

$ gem install pg

and get:

error: while executing gem ... (gem::filepermissionerror) don't have write permissions /library/ruby/gems/2.0.0 directory.

update 1:

rmv list rvm rubies ruby-1.9.3-p327 [ x86_64 ] ruby-1.9.3-p362 [ x86_64 ] ruby-1.9.3-p550 [ x86_64 ] ruby-2.0.0-rc1 [ x86_64 ] * ruby-2.1.4 [ x86_64 ]

if ruby get:

/usr/bin/ruby

this means using scheme ruby? or rvm installed under scheme folders?

update 2:

i switched scheme ruby. did:

$rvm utilize default

using /users/myname/.rvm/gems/ruby-2.1.4

$which ruby:

/users/myname/.rvm/rubies/ruby-2.1.4/bin/ruby

$ruby -v

ruby 2.1.4p265 (2014-10-27 revision 48166) [x86_64-darwin14.0]

now if

$rails -v

/system/library/frameworks/ruby.framework/versions/2.0/usr/lib/ruby/2.0.0/rubygems/dependency.rb:296:in `to_specs': not find 'railties' (>= 0) among 8 total gem(s) (gem::loaderror) /system/library/frameworks/ruby.framework/versions/2.0/usr/lib/ruby/2.0.0/rubygems/dependency.rb:307:in `to_spec' /system/library/frameworks/ruby.framework/versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_gem.rb:47:in `gem' /usr/bin/rails:22:in `<main>'

i confused. mean need reinstall rails??

ruby postgresql ruby-on-rails-4 rubygems rvm

No comments:

Post a Comment