Closed Bressie closed 9 years ago
You did not seed your db properly
Brandon
On Jun 3, 2015, at 5:31 AM, Bressie notifications@github.com wrote:
ActiveRecord::StatementInvalid in Devise::SessionsController#new
Mysql2::Error: Table 'pf_dev.global_settings' doesn't exist: SELECT global_settings.* FROM global_settings ORDER BY global_settings.id ASC LIMIT 1
Extracted source (around line #16):
14 15 def self.apache_status 16 #{first.command_apache_status} 2>&1 17 end 18 19 def self.apache_vhosts
Rails.root: /var/www/phishing-frenzy
Application Trace | Framework Trace | Full Trace app/models/global_settings.rb:16:in apache_status' app/models/system_monitor.rb:5:inapache' app/controllers/application_controller.rb:19:in `system_status'
Request
Parameters: None
— Reply to this email directly or view it on GitHub.
I did following:
mysql -u root -p mysql> create database pf_dev; mysql> grant all privileges on pf_dev.* to 'pf_dev'@'localhost' identified by 'password';
rake db:seed
Or for production mode
RAILS_ENV=production rake db:seed
You run the seed after your migrations as stated in the install guides.
Brandon
On Jun 3, 2015, at 7:09 AM, Bressie notifications@github.com wrote:
I did following:
mysql -u root -p mysql> create database pf_dev; mysql> grant all privileges on pf_dev.* to 'pf_dev'@'localhost' identified by 'password';
— Reply to this email directly or view it on GitHub.
when I try to run bundle install --deployment I am getting error message. it looks like permission issue. should I change permissions of the /var/www/phishing-frenzy/vendor to 775?
--- ERROR REPORT TEMPLATE -------------------------------------------------------
What did you do?
I ran the command /home/blaz/.rvm/gems/ruby-2.1.1/bin/bundle install --deployment
What did you expect to happen?
I expected Bundler to...
What happened instead?
Instead, what actually happened was...
Error details
Errno::EACCES: Permission denied @ dir_s_mkdir - /var/www/phishing-frenzy/vendor/bundle
/home/blaz/.rvm/rubies/ruby-2.1.1/lib/ruby/2.1.0/fileutils.rb:250:in `mkdir'
/home/blaz/.rvm/rubies/ruby-2.1.1/lib/ruby/2.1.0/fileutils.rb:250:in `fu_mkdir'
/home/blaz/.rvm/rubies/ruby-2.1.1/lib/ruby/2.1.0/fileutils.rb:224:in `block (2 levels) in mkdir_p'
/home/blaz/.rvm/rubies/ruby-2.1.1/lib/ruby/2.1.0/fileutils.rb:222:in `reverse_each'
/home/blaz/.rvm/rubies/ruby-2.1.1/lib/ruby/2.1.0/fileutils.rb:222:in `block in mkdir_p'
/home/blaz/.rvm/rubies/ruby-2.1.1/lib/ruby/2.1.0/fileutils.rb:208:in `each'
/home/blaz/.rvm/rubies/ruby-2.1.1/lib/ruby/2.1.0/fileutils.rb:208:in `mkdir_p'
/home/blaz/.rvm/gems/ruby-2.1.1/gems/bundler-1.10.2/lib/bundler.rb:307:in `mkdir_p'
/home/blaz/.rvm/gems/ruby-2.1.1/gems/bundler-1.10.2/lib/bundler/installer.rb:287:in `create_bundle_path'
/home/blaz/.rvm/gems/ruby-2.1.1/gems/bundler-1.10.2/lib/bundler/installer.rb:54:in `run'
/home/blaz/.rvm/gems/ruby-2.1.1/gems/bundler-1.10.2/lib/bundler/installer.rb:18:in `install'
/home/blaz/.rvm/gems/ruby-2.1.1/gems/bundler-1.10.2/lib/bundler/cli/install.rb:107:in `run'
/home/blaz/.rvm/gems/ruby-2.1.1/gems/bundler-1.10.2/lib/bundler/cli.rb:158:in `install'
/home/blaz/.rvm/gems/ruby-2.1.1/gems/bundler-1.10.2/lib/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
/home/blaz/.rvm/gems/ruby-2.1.1/gems/bundler-1.10.2/lib/bundler/vendor/thor/lib/thor/invocation.rb:126:in `invoke_command'
/home/blaz/.rvm/gems/ruby-2.1.1/gems/bundler-1.10.2/lib/bundler/vendor/thor/lib/thor.rb:359:in `dispatch'
/home/blaz/.rvm/gems/ruby-2.1.1/gems/bundler-1.10.2/lib/bundler/vendor/thor/lib/thor/base.rb:440:in `start'
/home/blaz/.rvm/gems/ruby-2.1.1/gems/bundler-1.10.2/lib/bundler/cli.rb:10:in `start'
/home/blaz/.rvm/gems/ruby-2.1.1/gems/bundler-1.10.2/bin/bundle:20:in `block in <top (required)>'
/home/blaz/.rvm/gems/ruby-2.1.1/gems/bundler-1.10.2/lib/bundler/friendly_errors.rb:7:in `with_friendly_errors'
/home/blaz/.rvm/gems/ruby-2.1.1/gems/bundler-1.10.2/bin/bundle:18:in `<top (required)>'
/home/blaz/.rvm/gems/ruby-2.1.1/bin/bundle:23:in `load'
/home/blaz/.rvm/gems/ruby-2.1.1/bin/bundle:23:in `<main>'
/home/blaz/.rvm/gems/ruby-2.1.1/bin/ruby_executable_hooks:15:in `eval'
/home/blaz/.rvm/gems/ruby-2.1.1/bin/ruby_executable_hooks:15:in `<main>'
Environment
Bundler 1.10.2
Rubygems 2.4.7
Ruby 2.1.1p76 (2014-02-24 revision 45161) [x86_64-linux]
GEM_HOME /var/www/phishing-frenzy/vendor/bundle/ruby/2.1.0
GEM_PATH
RVM 1.26.11 (master)
Git 1.9.1
Bundler settings
frozen
Set for your local app (/var/www/phishing-frenzy/.bundle/config): "1"
path
Set for your local app (/var/www/phishing-frenzy/.bundle/config): "vendor/bundle"
disable_shared_gems
Set for your local app (/var/www/phishing-frenzy/.bundle/config): "1"
--- TEMPLATE END ----------------------------------------------------------------
Append rvmsudo in front of the command.
Brandon
On Jun 3, 2015, at 7:41 AM, Bressie notifications@github.com wrote:
when I try to run bundle install --deployment I am getting error message. it looks like permission issue. should I change permissions of the /var/www/phishing-frenzy/vendor to 775?
--- ERROR REPORT TEMPLATE -------------------------------------------------------
What did you do?
I ran the command /home/blaz/.rvm/gems/ruby-2.1.1/bin/bundle install --deployment
What did you expect to happen?
I expected Bundler to...
What happened instead?
Instead, what actually happened was...
Error details
Errno::EACCES: Permission denied @ dir_s_mkdir - /var/www/phishing-frenzy/vendor/bundle /home/blaz/.rvm/rubies/ruby-2.1.1/lib/ruby/2.1.0/fileutils.rb:250:in
mkdir' /home/blaz/.rvm/rubies/ruby-2.1.1/lib/ruby/2.1.0/fileutils.rb:250:in
fu_mkdir' /home/blaz/.rvm/rubies/ruby-2.1.1/lib/ruby/2.1.0/fileutils.rb:224:inblock (2 levels) in mkdir_p' /home/blaz/.rvm/rubies/ruby-2.1.1/lib/ruby/2.1.0/fileutils.rb:222:in
reverse_each' /home/blaz/.rvm/rubies/ruby-2.1.1/lib/ruby/2.1.0/fileutils.rb:222:inblock in mkdir_p' /home/blaz/.rvm/rubies/ruby-2.1.1/lib/ruby/2.1.0/fileutils.rb:208:in
each' /home/blaz/.rvm/rubies/ruby-2.1.1/lib/ruby/2.1.0/fileutils.rb:208:inmkdir_p' /home/blaz/.rvm/gems/ruby-2.1.1/gems/bundler-1.10.2/lib/bundler.rb:307:in
mkdir_p' /home/blaz/.rvm/gems/ruby-2.1.1/gems/bundler-1.10.2/lib/bundler/installer.rb:287:increate_bundle_path' /home/blaz/.rvm/gems/ruby-2.1.1/gems/bundler-1.10.2/lib/bundler/installer.rb:54:in
run' /home/blaz/.rvm/gems/ruby-2.1.1/gems/bundler-1.10.2/lib/bundler/installer.rb:18:ininstall' /home/blaz/.rvm/gems/ruby-2.1.1/gems/bundler-1.10.2/lib/bundler/cli/install.rb:107:in
run' /home/blaz/.rvm/gems/ruby-2.1.1/gems/bundler-1.10.2/lib/bundler/cli.rb:158:ininstall' /home/blaz/.rvm/gems/ruby-2.1.1/gems/bundler-1.10.2/lib/bundler/vendor/thor/lib/thor/command.rb:27:in
run' /home/blaz/.rvm/gems/ruby-2.1.1/gems/bundler-1.10.2/lib/bundler/vendor/thor/lib/thor/invocation.rb:126:ininvoke_command' /home/blaz/.rvm/gems/ruby-2.1.1/gems/bundler-1.10.2/lib/bundler/vendor/thor/lib/thor.rb:359:in
dispatch' /home/blaz/.rvm/gems/ruby-2.1.1/gems/bundler-1.10.2/lib/bundler/vendor/thor/lib/thor/base.rb:440:instart' /home/blaz/.rvm/gems/ruby-2.1.1/gems/bundler-1.10.2/lib/bundler/cli.rb:10:in
start' /home/blaz/.rvm/gems/ruby-2.1.1/gems/bundler-1.10.2/bin/bundle:20:inblock in <top (required)>' /home/blaz/.rvm/gems/ruby-2.1.1/gems/bundler-1.10.2/lib/bundler/friendly_errors.rb:7:in
with_friendly_errors' /home/blaz/.rvm/gems/ruby-2.1.1/gems/bundler-1.10.2/bin/bundle:18:in<top (required)>' /home/blaz/.rvm/gems/ruby-2.1.1/bin/bundle:23:in
load' /home/blaz/.rvm/gems/ruby-2.1.1/bin/bundle:23:in<main>' /home/blaz/.rvm/gems/ruby-2.1.1/bin/ruby_executable_hooks:15:in
eval' /home/blaz/.rvm/gems/ruby-2.1.1/bin/ruby_executable_hooks:15:in `' Environment Bundler 1.10.2 Rubygems 2.4.7 Ruby 2.1.1p76 (2014-02-24 revision 45161) [x86_64-linux] GEM_HOME /var/www/phishing-frenzy/vendor/bundle/ruby/2.1.0 GEM_PATH RVM 1.26.11 (master) Git 1.9.1 Bundler settings
frozen Set for your local app (/var/www/phishing-frenzy/.bundle/config): "1" path Set for your local app (/var/www/phishing-frenzy/.bundle/config): "vendor/bundle" disable_shared_gems Set for your local app (/var/www/phishing-frenzy/.bundle/config): "1" --- TEMPLATE END ----------------------------------------------------------------
— Reply to this email directly or view it on GitHub.
that worked. I tried to run as a root but did not work.
Thanks for the support everything looks good ;)
ActiveRecord::StatementInvalid in Devise::SessionsController#new
Mysql2::Error: Table 'pf_dev.global_settings' doesn't exist: SELECT
global_settings
.* FROMglobal_settings
ORDER BYglobal_settings
.id
ASC LIMIT 1Extracted source (around line #16):
14 15 def self.apache_status 16
#{first.command_apache_status} 2>&1
17 end 18 19 def self.apache_vhostsRails.root: /var/www/phishing-frenzy
Application Trace | Framework Trace | Full Trace app/models/global_settings.rb:16:in
apache_status' app/models/system_monitor.rb:5:in
apache' app/controllers/application_controller.rb:19:in `system_status'Request
Parameters: None