로컬 컴퓨터에서 torquebox 환경에 레일을 배치하고 모든 것이 잘 진행되고 있습니다.torquebox 환경에 연결된 레일 콘솔을 실행하는 방법 (프로덕션 환경에서)
저는 started guide with RVM에 이어 다른 하나의 제안 인 clustering, sessions replication 및 distributed caching을 따라했습니다. 나는 또한 background jobs support을 시도했다.
이제 응용 프로그램을 로컬 노드 2 개 클러스터에서 실행하고 포트에서 다른 포트로 전환하고 동일한 세션과 동일한 캐싱 데이터를 사용합니다.
이제 토크 실 환경에 연결된 레일 콘솔을 시작하는 방법에 대해 질문하십니까? 나는 웹 응용 프로그램에서 캐시 값을 읽을 수있어 콘솔로드 잘하는 동안이 응용 프로그램 디렉토리에
rails c production
함께 노력하고, Rails.cache.read(:any_key)
항상 전무를 반환합니다. 또한이 콘솔에서 backgroundable 메서드를 호출 할 수 없습니다. Search.foo
내가이 예외를 가지고 있어요 backgroundable 방법임을 감안할 때 :
NameError: missing class or uppercase package name (`org.torquebox.core.util.StringUtils')
from org/jruby/javasupport/JavaUtilities.java:54:in `get_proxy_or_package_under_package'
from file:/Users/fabio/.rvm/rubies/jruby-1.7.8/lib/jruby.jar!/jruby/java/java_package_module_template.rb:14:in `method_missing'
from /Users/fabio/.rvm/gems/jruby-1.7.8/gems/torquebox-messaging-3.0.1-java/lib/torquebox/messaging/task.rb:33:in `queue_name'
from /Users/fabio/.rvm/gems/jruby-1.7.8/gems/torquebox-messaging-3.0.1-java/lib/torquebox/messaging/backgroundable.rb:198:in `publish_message'
from /Users/fabio/.rvm/gems/jruby-1.7.8/gems/torquebox-messaging-3.0.1-java/lib/torquebox/messaging/backgroundable.rb:158:in `__async_foo'
from (irb):2:in `evaluate'
from org/jruby/RubyKernel.java:1123:in `eval'
from org/jruby/RubyKernel.java:1519:in `loop'
from org/jruby/RubyKernel.java:1284:in `catch'
from org/jruby/RubyKernel.java:1284:in `catch'
from /Users/fabio/.rvm/gems/jruby-1.7.8/gems/railties-3.2.15/lib/rails/commands/console.rb:47:in `start'
from /Users/fabio/.rvm/gems/jruby-1.7.8/gems/railties-3.2.15/lib/rails/commands/console.rb:8:in `start'
from /Users/fabio/.rvm/gems/jruby-1.7.8/gems/railties-3.2.15/lib/rails/commands.rb:41:in `(root)'
from org/jruby/RubyKernel.java:1084:in `require'
from script/rails:6:in `(root)'
이 나는 또한 다음 명령
torquebox exec /full/path/to/app-knob.yml 'rails c production'
bundle exec torquebox exec /full/path/to/app-knob.yml 'rails c production'
를 사용하여 콘솔을 실행하려고했습니다 모두
Search.foo
및
Search.background.foo
으로 발생
그들과 함께 오류가 발생했습니다
chmod: vendor/bundle/jruby/1.9/bin/*: No such file or directory
내가 뭔가를 놓친 건가요?
마지막 주
TorqueBox.configure do
environment do
RAILS_ENV 'production'
GEM_HOME "#{ENV['rvm_path']}/gems/jruby-1.7.8"
GEM_PATH "#{ENV['rvm_path']}/gems/jruby-1.7.8:#{ENV['rvm_path']}/gems/[email protected]"
end
options_for Backgroundable, concurrency: 10
end
내가 함께하고 GEM_*
ENV 변수
힌트를 주셔서 감사합니다. 어쨌든 나는 높은 트래픽 생산 애플 리케이션을 위해 아주 좋은 박스 클러스터링 지원을 위해 토크 박스를 시험해보고 싶다. 그것은 단지 실험입니다 ... – Fabio
확실히 * 외모 * 인상적입니다, 나는 아직 포기하지 않았습니다. – bbozo