{"action":"created","issue":{"url":"https://api.github.com/repos/PENGZhaoqing/CourseSelect/issues/2","repository_url":"https://api.github.com/repos/PENGZhaoqing/CourseSelect","labels_url":"https://api.github.com/repos/PENGZhaoqing/CourseSelect/issues/2/labels{/name}","comments_url":"https://api.github.com/repos/PENGZhaoqing/CourseSelect/issues/2/comments","events_url":"https://api.github.com/repos/PENGZhaoqing/CourseSelect/issues/2/events","html_url":"https://github.com/PENGZhaoqing/CourseSelect/issues/2","id":178532000,"number":2,"title":"安装pg gem错误","user":{"login":"PENGZhaoqing","id":11887913,"avatar_url":"https://avatars.githubusercontent.com/u/11887913?v=3","gravatar_id":"","url":"https://api.github.com/users/PENGZhaoqing","html_url":"https://github.com/PENGZhaoqing","followers_url":"https://api.github.com/users/PENGZhaoqing/followers","following_url":"https://api.github.com/users/PENGZhaoqing/following{/other_user}","gists_url":"https://api.github.com/users/PENGZhaoqing/gists{/gist_id}","starred_url":"https://api.github.com/users/PENGZhaoqing/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PENGZhaoqing/subscriptions","organizations_url":"https://api.github.com/users/PENGZhaoqing/orgs","repos_url":"https://api.github.com/users/PENGZhaoqing/repos","events_url":"https://api.github.com/users/PENGZhaoqing/events{/privacy}","received_events_url":"https://api.github.com/users/PENGZhaoqing/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-09-22T06:26:17Z","updated_at":"2016-09-22T06:34:05Z","closed_at":null,"body":"`Specified 'postgresql' for database adapter, but the gem is not loaded. Add gem 'pg' to your Gemfile (and ensure its version is at the minimum required by ActiveRecord).\r\n`\r\n创建表的时候输入代码rake db:create:all直接报错，然后gem install pg，bundle之后还是出现这个问题\r\n\r\n以下是错误log：\r\n```\r\n\r\n$ rake db:create:all\r\nSpecified 'postgresql' for database adapter, but the gem is not loaded. Add gem 'pg' to your Gemfile (and ensure its version is at the minimum required by ActiveRecord).\r\n/usr/local/rvm/gems/ruby-2.3.0/gems/activerecord-4.2.5/lib/active_record/connection_adapters/connection_specification.rb:177:in rescue in spec' /usr/local/rvm/gems/ruby-2.3.0/gems/activerecord-4.2.5/lib/active_record/connection_adapters/connection_specification.rb:174:inspec'\r\n/usr/local/rvm/gems/ruby-2.3.0/gems/activerecord-4.2.5/lib/active_record/connection_handling.rb:50:in establish_connection' /usr/local/rvm/gems/ruby-2.3.0/gems/activerecord-4.2.5/lib/active_record/tasks/postgresql_database_tasks.rb:6:inestablish_connection'\r\n/usr/local/rvm/gems/ruby-2.3.0/gems/activerecord-4.2.5/lib/active_record/tasks/postgresql_database_tasks.rb:76:in establish_master_connection' /usr/local/rvm/gems/ruby-2.3.0/gems/activerecord-4.2.5/lib/active_record/tasks/postgresql_database_tasks.rb:14:increate'\r\n/usr/local/rvm/gems/ruby-2.3.0/gems/activerecord-4.2.5/lib/active_record/tasks/database_tasks.rb:93:in create' /usr/local/rvm/gems/ruby-2.3.0/gems/activerecord-4.2.5/lib/active_record/tasks/database_tasks.rb:102:inblock in create_all'\r\n/usr/local/rvm/gems/ruby-2.3.0/gems/activerecord-4.2.5/lib/active_record/tasks/database_tasks.rb:284:in block in each_local_configuration' /usr/local/rvm/gems/ruby-2.3.0/gems/activerecord-4.2.5/lib/active_record/tasks/database_tasks.rb:280:ineach_value'\r\n/usr/local/rvm/gems/ruby-2.3.0/gems/activerecord-4.2.5/lib/active_record/tasks/database_tasks.rb:280:in each_local_configuration' /usr/local/rvm/gems/ruby-2.3.0/gems/activerecord-4.2.5/lib/active_record/tasks/database_tasks.rb:102:increate_all'\r\n/usr/local/rvm/gems/ruby-2.3.0/gems/activerecord-4.2.5/lib/active_record/railties/databases.rake:11:in block (3 levels) in <top (required)>' /usr/local/rvm/gems/ruby-2.3.0/gems/rake-11.2.2/lib/rake/task.rb:248:inblock in execute'\r\n/usr/local/rvm/gems/ruby-2.3.0/gems/rake-11.2.2/lib/rake/task.rb:243:in each' /usr/local/rvm/gems/ruby-2.3.0/gems/rake-11.2.2/lib/rake/task.rb:243:inexecute'\r\n/usr/local/rvm/gems/ruby-2.3.0/gems/rake-11.2.2/lib/rake/task.rb:187:in block in invoke_with_call_chain' /usr/local/rvm/rubies/ruby-2.3.0/lib/ruby/2.3.0/monitor.rb:214:inmon_synchronize'\r\n/usr/local/rvm/gems/ruby-2.3.0/gems/rake-11.2.2/lib/rake/task.rb:180:in invoke_with_call_chain' /usr/local/rvm/gems/ruby-2.3.0/gems/rake-11.2.2/lib/rake/task.rb:173:ininvoke'\r\n/usr/local/rvm/gems/ruby-2.3.0/gems/rake-11.2.2/lib/rake/application.rb:152:in invoke_task' /usr/local/rvm/gems/ruby-2.3.0/gems/rake-11.2.2/lib/rake/application.rb:108:inblock (2 levels) in top_level'\r\n/usr/local/rvm/gems/ruby-2.3.0/gems/rake-11.2.2/lib/rake/application.rb:108:in each' /usr/local/rvm/gems/ruby-2.3.0/gems/rake-11.2.2/lib/rake/application.rb:108:inblock in top_level'\r\n/usr/local/rvm/gems/ruby-2.3.0/gems/rake-11.2.2/lib/rake/application.rb:117:in run_with_threads' /usr/local/rvm/gems/ruby-2.3.0/gems/rake-11.2.2/lib/rake/application.rb:102:intop_level'\r\n/usr/local/rvm/gems/ruby-2.3.0/gems/rake-11.2.2/lib/rake/application.rb:80:in block in run' /usr/local/rvm/gems/ruby-2.3.0/gems/rake-11.2.2/lib/rake/application.rb:178:instandard_exception_handling'\r\n/usr/local/rvm/gems/ruby-2.3.0/gems/rake-11.2.2/lib/rake/application.rb:77:in run' /usr/local/rvm/gems/ruby-2.3.0/gems/rake-11.2.2/exe/rake:27:in'\r\n/usr/local/rvm/gems/ruby-2.3.0/bin/rake:23:in load' /usr/local/rvm/gems/ruby-2.3.0/bin/rake:23:in\r\n\r\n'\r\nCouldn't create database for {\"adapter\"=>\"postgresql\", \"encoding\"=>\"unicode\", \"pool\"=>5, \"database\"=>\"courseselect_development\"}\r\nSpecified 'postgresql' for database adapter, but the gem is not loaded. Add gem 'pg' to your Gemfile (and ensure its version is at the minimum required by ActiveRecord).\r\n/usr/local/rvm/gems/ruby-2.3.0/gems/activerecord-4.2.5/lib/active_record/connection_adapters/connection_specification.rb:177:in rescue in spec' /usr/local/rvm/gems/ruby-2.3.0/gems/activerecord-4.2.5/lib/active_record/connection_adapters/connection_specification.rb:174:inspec'\r\n/usr/local/rvm/gems/ruby-2.3.0/gems/activerecord-4.2.5/lib/active_record/connection_handling.rb:50:in establish_connection' /usr/local/rvm/gems/ruby-2.3.0/gems/activerecord-4.2.5/lib/active_record/tasks/postgresql_database_tasks.rb:6:inestablish_connection'\r\n/usr/local/rvm/gems/ruby-2.3.0/gems/activerecord-4.2.5/lib/active_record/tasks/postgresql_database_tasks.rb:76:in establish_master_connection' /usr/local/rvm/gems/ruby-2.3.0/gems/activerecord-4.2.5/lib/active_record/tasks/postgresql_database_tasks.rb:14:increate'\r\n/usr/local/rvm/gems/ruby-2.3.0/gems/activerecord-4.2.5/lib/active_record/tasks/database_tasks.rb:93:in create' /usr/local/rvm/gems/ruby-2.3.0/gems/activerecord-4.2.5/lib/active_record/tasks/database_tasks.rb:102:inblock in create_all'\r\n/usr/local/rvm/gems/ruby-2.3.0/gems/activerecord-4.2.5/lib/active_record/tasks/database_tasks.rb:284:in block in each_local_configuration' /usr/local/rvm/gems/ruby-2.3.0/gems/activerecord-4.2.5/lib/active_record/tasks/database_tasks.rb:280:ineach_value'\r\n/usr/local/rvm/gems/ruby-2.3.0/gems/activerecord-4.2.5/lib/active_record/tasks/database_tasks.rb:280:in each_local_configuration' /usr/local/rvm/gems/ruby-2.3.0/gems/activerecord-4.2.5/lib/active_record/tasks/database_tasks.rb:102:increate_all'\r\n/usr/local/rvm/gems/ruby-2.3.0/gems/activerecord-4.2.5/lib/active_record/railties/databases.rake:11:in block (3 levels) in <top (required)>' /usr/local/rvm/gems/ruby-2.3.0/gems/rake-11.2.2/lib/rake/task.rb:248:inblock in execute'\r\n/usr/local/rvm/gems/ruby-2.3.0/gems/rake-11.2.2/lib/rake/task.rb:243:in each' /usr/local/rvm/gems/ruby-2.3.0/gems/rake-11.2.2/lib/rake/task.rb:243:inexecute'\r\n/usr/local/rvm/gems/ruby-2.3.0/gems/rake-11.2.2/lib/rake/task.rb:187:in block in invoke_with_call_chain' /usr/local/rvm/rubies/ruby-2.3.0/lib/ruby/2.3.0/monitor.rb:214:inmon_synchronize'\r\n/usr/local/rvm/gems/ruby-2.3.0/gems/rake-11.2.2/lib/rake/task.rb:180:in invoke_with_call_chain' /usr/local/rvm/gems/ruby-2.3.0/gems/rake-11.2.2/lib/rake/task.rb:173:ininvoke'\r\n/usr/local/rvm/gems/ruby-2.3.0/gems/rake-11.2.2/lib/rake/application.rb:152:in invoke_task' /usr/local/rvm/gems/ruby-2.3.0/gems/rake-11.2.2/lib/rake/application.rb:108:inblock (2 levels) in top_level'\r\n/usr/local/rvm/gems/ruby-2.3.0/gems/rake-11.2.2/lib/rake/application.rb:108:in each' /usr/local/rvm/gems/ruby-2.3.0/gems/rake-11.2.2/lib/rake/application.rb:108:inblock in top_level'\r\n/usr/local/rvm/gems/ruby-2.3.0/gems/rake-11.2.2/lib/rake/application.rb:117:in run_with_threads' /usr/local/rvm/gems/ruby-2.3.0/gems/rake-11.2.2/lib/rake/application.rb:102:intop_level'\r\n/usr/local/rvm/gems/ruby-2.3.0/gems/rake-11.2.2/lib/rake/application.rb:80:in block in run' /usr/local/rvm/gems/ruby-2.3.0/gems/rake-11.2.2/lib/rake/application.rb:178:instandard_exception_handling'\r\n/usr/local/rvm/gems/ruby-2.3.0/gems/rake-11.2.2/lib/rake/application.rb:77:in run' /usr/local/rvm/gems/ruby-2.3.0/gems/rake-11.2.2/exe/rake:27:in'\r\n/usr/local/rvm/gems/ruby-2.3.0/bin/rake:23:in load' /usr/local/rvm/gems/ruby-2.3.0/bin/rake:23:in'\r\nCouldn't create database for {\"adapter\"=>\"postgresql\", \"encoding\"=>\"unicode\", \"pool\"=>5, \"database\"=>\"courseselect_test\"}\r\nSpecified 'postgresql' for database adapter, but the gem is not loaded. Add gem 'pg' to your Gemfile (and ensure its version is at the minimum required by ActiveRecord).\r\n/usr/local/rvm/gems/ruby-2.3.0/gems/activerecord-4.2.5/lib/active_record/connection_adapters/connection_specification.rb:177:in rescue in spec' /usr/local/rvm/gems/ruby-2.3.0/gems/activerecord-4.2.5/lib/active_record/connection_adapters/connection_specification.rb:174:inspec'\r\n/usr/local/rvm/gems/ruby-2.3.0/gems/activerecord-4.2.5/lib/active_record/connection_handling.rb:50:in establish_connection' /usr/local/rvm/gems/ruby-2.3.0/gems/activerecord-4.2.5/lib/active_record/tasks/postgresql_database_tasks.rb:6:inestablish_connection'\r\n/usr/local/rvm/gems/ruby-2.3.0/gems/activerecord-4.2.5/lib/active_record/tasks/postgresql_database_tasks.rb:76:in establish_master_connection' /usr/local/rvm/gems/ruby-2.3.0/gems/activerecord-4.2.5/lib/active_record/tasks/postgresql_database_tasks.rb:14:increate'\r\n/usr/local/rvm/gems/ruby-2.3.0/gems/activerecord-4.2.5/lib/active_record/tasks/database_tasks.rb:93:in create' /usr/local/rvm/gems/ruby-2.3.0/gems/activerecord-4.2.5/lib/active_record/tasks/database_tasks.rb:102:inblock in create_all'\r\n/usr/local/rvm/gems/ruby-2.3.0/gems/activerecord-4.2.5/lib/active_record/tasks/database_tasks.rb:284:in block in each_local_configuration' /usr/local/rvm/gems/ruby-2.3.0/gems/activerecord-4.2.5/lib/active_record/tasks/database_tasks.rb:280:ineach_value'\r\n/usr/local/rvm/gems/ruby-2.3.0/gems/activerecord-4.2.5/lib/active_record/tasks/database_tasks.rb:280:in each_local_configuration' /usr/local/rvm/gems/ruby-2.3.0/gems/activerecord-4.2.5/lib/active_record/tasks/database_tasks.rb:102:increate_all'\r\n/usr/local/rvm/gems/ruby-2.3.0/gems/activerecord-4.2.5/lib/active_record/railties/databases.rake:11:in block (3 levels) in <top (required)>' /usr/local/rvm/gems/ruby-2.3.0/gems/rake-11.2.2/lib/rake/task.rb:248:inblock in execute'\r\n/usr/local/rvm/gems/ruby-2.3.0/gems/rake-11.2.2/lib/rake/task.rb:243:in each' /usr/local/rvm/gems/ruby-2.3.0/gems/rake-11.2.2/lib/rake/task.rb:243:inexecute'\r\n/usr/local/rvm/gems/ruby-2.3.0/gems/rake-11.2.2/lib/rake/task.rb:187:in block in invoke_with_call_chain' /usr/local/rvm/rubies/ruby-2.3.0/lib/ruby/2.3.0/monitor.rb:214:inmon_synchronize'\r\n/usr/local/rvm/gems/ruby-2.3.0/gems/rake-11.2.2/lib/rake/task.rb:180:in invoke_with_call_chain' /usr/local/rvm/gems/ruby-2.3.0/gems/rake-11.2.2/lib/rake/task.rb:173:ininvoke'\r\n/usr/local/rvm/gems/ruby-2.3.0/gems/rake-11.2.2/lib/rake/application.rb:152:in invoke_task' /usr/local/rvm/gems/ruby-2.3.0/gems/rake-11.2.2/lib/rake/application.rb:108:inblock (2 levels) in top_level'\r\n/usr/local/rvm/gems/ruby-2.3.0/gems/rake-11.2.2/lib/rake/application.rb:108:in each' /usr/local/rvm/gems/ruby-2.3.0/gems/rake-11.2.2/lib/rake/application.rb:108:inblock in top_level'\r\n/usr/local/rvm/gems/ruby-2.3.0/gems/rake-11.2.2/lib/rake/application.rb:117:in run_with_threads' /usr/local/rvm/gems/ruby-2.3.0/gems/rake-11.2.2/lib/rake/application.rb:102:intop_level'\r\n/usr/local/rvm/gems/ruby-2.3.0/gems/rake-11.2.2/lib/rake/application.rb:80:in block in run' /usr/local/rvm/gems/ruby-2.3.0/gems/rake-11.2.2/lib/rake/application.rb:178:instandard_exception_handling'\r\n/usr/local/rvm/gems/ruby-2.3.0/gems/rake-11.2.2/lib/rake/application.rb:77:in run' /usr/local/rvm/gems/ruby-2.3.0/gems/rake-11.2.2/exe/rake:27:in'\r\n/usr/local/rvm/gems/ruby-2.3.0/bin/rake:23:in load' /usr/local/rvm/gems/ruby-2.3.0/bin/rake:23:in'\r\nCouldn't create database for {\"adapter\"=>\"postgresql\", \"encoding\"=>\"unicode\", \"pool\"=>5, \"database\"=>\"courseselect_developement\"}\r\n```\r\n\r\n\r\n谢谢楼主"},"comment":{"url":"https://api.github.com/repos/PENGZhaoqing/CourseSelect/issues/comments/248823727","html_url":"https://github.com/PENGZhaoqing/CourseSelect/issues/2#issuecomment-248823727","issue_url":"https://api.github.com/repos/PENGZhaoqing/CourseSelect/issues/2","id":248823727,"user":{"login":"zq2501330612","id":17960021,"avatar_url":"https://avatars.githubusercontent.com/u/17960021?v=3","gravatar_id":"","url":"https://api.github.com/users/zq2501330612","html_url":"https://github.com/zq2501330612","followers_url":"https://api.github.com/users/zq2501330612/followers","following_url":"https://api.github.com/users/zq2501330612/following{/other_user}","gists_url":"https://api.github.com/users/zq2501330612/gists{/gist_id}","starred_url":"https://api.github.com/users/zq2501330612/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zq2501330612/subscriptions","organizations_url":"https://api.github.com/users/zq2501330612/orgs","repos_url":"https://api.github.com/users/zq2501330612/repos","events_url":"https://api.github.com/users/zq2501330612/events{/privacy}","received_events_url":"https://api.github.com/users/zq2501330612/received_events","type":"User","site_admin":false},"created_at":"2016-09-22T06:34:05Z","updated_at":"2016-09-22T06:34:05Z","body":"GEM\r\n  remote: https://rubygems.org/\r\n  specs:\r\n    actionmailer (4.2.5)\r\n      actionpack (= 4.2.5)\r\n      actionview (= 4.2.5)\r\n      activejob (= 4.2.5)\r\n      mail (~> 2.5, >= 2.5.4)\r\n      rails-dom-testing (~> 1.0, >= 1.0.5)\r\n    actionpack (4.2.5)\r\n      actionview (= 4.2.5)\r\n      activesupport (= 4.2.5)\r\n      rack (~> 1.6)\r\n      rack-test (~> 0.6.2)\r\n      rails-dom-testing (~> 1.0, >= 1.0.5)\r\n      rails-html-sanitizer (~> 1.0, >= 1.0.2)\r\n    actionview (4.2.5)\r\n      activesupport (= 4.2.5)\r\n      builder (~> 3.1)\r\n      erubis (~> 2.7.0)\r\n      rails-dom-testing (~> 1.0, >= 1.0.5)\r\n      rails-html-sanitizer (~> 1.0, >= 1.0.2)\r\n    activejob (4.2.5)\r\n      activesupport (= 4.2.5)\r\n      globalid (>= 0.3.0)\r\n    activemodel (4.2.5)\r\n      activesupport (= 4.2.5)\r\n      builder (~> 3.1)\r\n    activerecord (4.2.5)\r\n      activemodel (= 4.2.5)\r\n      activesupport (= 4.2.5)\r\n      arel (~> 6.0)\r\n    activesupport (4.2.5)\r\n      i18n (~> 0.7)\r\n      json (~> 1.7, >= 1.7.7)\r\n      minitest (~> 5.1)\r\n      thread_safe (~> 0.3, >= 0.3.4)\r\n      tzinfo (~> 1.1)\r\n    arel (6.0.3)\r\n    binding_of_caller (0.7.2)\r\n      debug_inspector (>= 0.0.1)\r\n    builder (3.2.2)\r\n    byebug (9.0.5)\r\n    coffee-rails (4.1.1)\r\n      coffee-script (>= 2.2.0)\r\n      railties (>= 4.0.0, < 5.1.x)\r\n    coffee-script (2.4.1)\r\n      coffee-script-source\r\n      execjs\r\n    coffee-script-source (1.10.0)\r\n    concurrent-ruby (1.0.2)\r\n    debug_inspector (0.0.2)\r\n    erubis (2.7.0)\r\n    execjs (2.7.0)\r\n    globalid (0.3.7)\r\n      activesupport (>= 4.1.0)\r\n    i18n (0.7.0)\r\n    jbuilder (2.6.0)\r\n      activesupport (>= 3.0.0, < 5.1)\r\n      multi_json (~> 1.2)\r\n    jquery-rails (4.2.1)\r\n      rails-dom-testing (>= 1, < 3)\r\n      railties (>= 4.2.0)\r\n      thor (>= 0.14, < 2.0)\r\n    json (1.8.3)\r\n    loofah (2.0.3)\r\n      nokogiri (>= 1.5.9)\r\n    mail (2.6.4)\r\n      mime-types (>= 1.16, < 4)\r\n    mime-types (3.1)\r\n      mime-types-data (~> 3.2015)\r\n    mime-types-data (3.2016.0521)\r\n    mini_portile2 (2.1.0)\r\n    minitest (5.9.0)\r\n    multi_json (1.12.1)\r\n    nokogiri (1.6.8)\r\n      mini_portile2 (~> 2.1.0)\r\n      p"}}
{"actor":{"display_login":"zq2501330612"}}