tispratik / bs

BS
1 stars 0 forks source link

Sergey - bluepill: command not found #53

Open tispratik opened 14 years ago

tispratik commented 14 years ago

shell > sudo bluepill load config/production.pill sudo: bluepill: command not found

Hi Sergey, not sure why the above is failing. I added the following in environment.rb

Bluepill gems

config.gem 'bluepill' config.gem 'blankslate'
config.gem 'state_machine'

Installed the gems, still it dosent work.

svarks commented 14 years ago

ok, what i do:

rake ts:in before start sphinx, it won't start if no index exists.

also you may check for already ran process. Somehow searchd or delayed_job's ruby process may be ran but no pid exists, so you have to stop it manually. I don't know how it happens, seems like bluepill only manipulates with start/stop commands. I also changed timeouts to 20, maybe 10 wasn't enough.

sudo bluepill load config/development.pill $ sudo bluepill start Sent start to: :delayed_job :thinking_sphinx

$ sudo bluepill status delayed_job(pid:33412): up thinking_sphinx(pid:33421): up

tispratik commented 14 years ago

i did rake ts:in, the indexes were built but the same problem

[viridian 19] bs > ruby script/delayed_job start RAILS_ENV=production /home/deploy/rails_apps/bs/config/../vendor/rails/railties/lib/rails/gem_dependency.rb:119:Warning: Gem::Dependency#version_requirements is deprecated and will be removed on or after August 2010. Use #requirement /home/deploy/rails_apps/bs/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/connection_specification.rb:62:in establish_connection': development database is not configured (ActiveRecord::AdapterNotSpecified) from /home/deploy/rails_apps/bs/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/connection_specification.rb:55:inestablish_connection' from /home/deploy/rails_apps/bs/config/../vendor/rails/railties/lib/initializer.rb:438:in initialize_database' from /home/deploy/rails_apps/bs/config/../vendor/rails/railties/lib/initializer.rb:141:inprocess' from /home/deploy/rails_apps/bs/config/../vendor/rails/railties/lib/initializer.rb:113:in send' from /home/deploy/rails_apps/bs/config/../vendor/rails/railties/lib/initializer.rb:113:inrun' from /home/deploy/rails_apps/bs/config/environment.rb:5 from script/delayed_job:3:in `require' from script/delayed_job:3 [11:54 0.31] [viridian 20] bs > bluepill -bash: bluepill: command not found

tispratik commented 14 years ago

[viridian 19] bs > ruby script/delayed_job start RAILS_ENV=production /home/deploy/rails_apps/bs/config/../vendor/rails/railties/lib/rails/gem_dependency.rb:119:Warning: Gem::Dependency#version_requirements is deprecated and will be removed on or after August 2010. Use #requirement /home/deploy/rails_apps/bs/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/connection_specification.rb:62:in establish_connection': development database is not configured (ActiveRecord::AdapterNotSpecified) from /home/deploy/rails_apps/bs/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/connection_specification.rb:55:inestablish_connection' from /home/deploy/rails_apps/bs/config/../vendor/rails/railties/lib/initializer.rb:438:in initialize_database' from /home/deploy/rails_apps/bs/config/../vendor/rails/railties/lib/initializer.rb:141:inprocess' from /home/deploy/rails_apps/bs/config/../vendor/rails/railties/lib/initializer.rb:113:in send' from /home/deploy/rails_apps/bs/config/../vendor/rails/railties/lib/initializer.rb:113:inrun' from /home/deploy/rails_apps/bs/config/environment.rb:5 from script/delayed_job:3:in `require' from script/delayed_job:3 [11:54 0.31] [viridian 20] bs > bluepill -bash: bluepill: command not found

tispratik commented 14 years ago

It should not be looking for the development database.

svarks commented 14 years ago

added rails_env to pill. and sure you have to install gem to have bluepill command

tispratik commented 14 years ago

1. Am talking about: ruby script/delayed_job start RAILS_ENV=production This one is looking for development database.

  1. I have already installed bluepill gem. See its frozen in vendor/gems folder
svarks commented 14 years ago

RAILS_ENV=production script/delayed_job start should be working i think. i changed production scenario

tispratik commented 14 years ago

bs > sudo RAILS_ENV=production script/delayed_job start sudo: script/delayed_job: command not found

Still, not working.

svarks commented 14 years ago

RAILS_ENV=production ruby script/delayed_job start

tispratik commented 14 years ago

The demon did start, but gave lot of warnings.

[viridian 8] bs > sudo RAILS_ENV=production ruby script/delayed_job start /home/deploy/rails_apps/bs/config/../vendor/rails/railties/lib/rails/gem_dependency.rb:119:Warning: Gem::Dependency#version_requirements is deprecated and will be removed on or after August 2010. Use #requirement /home/deploy/rails_apps/bs/vendor/plugins/formtastic/lib/formtastic/i18n.rb:4: warning: already initialized constant DEFAULT_SCOPE /home/deploy/rails_apps/bs/vendor/plugins/formtastic/lib/formtastic/i18n.rb:11: warning: already initialized constant DEFAULT_VALUES /home/deploy/rails_apps/bs/vendor/plugins/formtastic/lib/formtastic/i18n.rb:15: warning: already initialized constant SCOPES /home/deploy/rails_apps/bs/vendor/plugins/formtastic/lib/formtastic.rb:28: warning: already initialized constant RESERVED_COLUMNS /home/deploy/rails_apps/bs/vendor/plugins/formtastic/lib/formtastic.rb:30: warning: already initialized constant INLINE_ERROR_TYPES /home/deploy/rails_apps/bs/vendor/plugins/formtastic/lib/formtastic.rb:1694: warning: already initialized constant FIELD_ERROR_PROC

svarks commented 14 years ago

not happens for me Gem::Dependency#version_requirements is here of course, its fixed in new rails versions

tispratik commented 14 years ago

Hi Sergey, Can you comment on this post?

http://groups.google.com/group/rubyonrails-talk/browse_thread/thread/39c65be1f64e410f

svarks commented 14 years ago

Looks like I cant comment, maybe because I joined just now.. Did you tried check PATH under sudo:

sudo echo $PATH

tispratik commented 14 years ago

Thanks for the reply Sergey.

ubuntu > whereis gem gem: /usr/bin/gem1.8 /usr/bin/gem /opt/ruby-enterprise-1.8.7-2010.01/ bin/gem

I think its a rubygems problem. I havent installed rubygems in the REE. Currently it is installed only in normal ruby. I will install rubygems in REE and uninstall from normal ruby and then check. Basically keeping only REE.