zacsek / activemessaging

Automatically exported from code.google.com/p/activemessaging
0 stars 0 forks source link

Don't support any other rails or dependencie version #47

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. I'm try to use activemessaging with rails 
2. I have two different versions of rails and activesupport on my
mac(2.3.2, 1.2.6)
3. And i trying to run the poller using script/poller, but i receive an
exception

What is the expected output? What do you see instead?
I receive a Gem::LoadError.

What version of the product are you using? On what operating system?
The lastest version. MAC OSX Leopard

Please provide any additional information below.
I have to delete and leave just 1 rails and dependecies version in my gem
list to script/poller work properly

Original issue reported on code.google.com by pedroh.m...@gmail.com on 27 Aug 2009 at 11:59

GoogleCodeExporter commented 8 years ago
Sorry guys i was unhappy when i choose the title of this issue, the properly 
title
was: Don't support more than one rails(or depedencies) version 

Original comment by pedroh.m...@gmail.com on 27 Aug 2009 at 12:02

GoogleCodeExporter commented 8 years ago
Not enough info for me to reproduce this (stack trace?)
I am working on a new version of the gem now, will retest.
I have lots of versions of rails locally, so if I get this or similar error, I 
will fix. 

Original comment by kooks...@gmail.com on 29 Mar 2010 at 10:15

GoogleCodeExporter commented 8 years ago
Similar problem here, activemessaging gem, 0.7.1, SnowLeopard.

My app uses Rails 2.3.2, but I have others versions installed.

DEPRECATION WARNING: require "activesupport" is deprecated and will be removed 
in Rails 3. Use require "active_support" instead.. (called from 
/Library/Ruby/Gems/1.8/gems/activesupport-2.3.5/lib/activesupport.rb:2)
...
poller: process with pid 74960 started.
Missing the Rails 2.3.2 gem. Please `gem install -v=2.3.2 rails`, update your 
RAILS_GEM_VERSION setting in config/environment.rb for the Rails version you do 
have installed, or comment out RAILS_GEM_VERSION to use the latest version 
installed.

Original comment by sandr...@gmail.com on 15 Jul 2010 at 9:43

GoogleCodeExporter commented 8 years ago
sandrods - this looks like a problem withe your path - the poller calls your 
config/environment.rb, it has no dependency of its own on a particular rails 
version.  You may need to specify a different instance of ruby.

Original comment by kooks...@gmail.com on 15 Jul 2010 at 9:47

GoogleCodeExporter commented 8 years ago
I think the problem lies in the script/poller file:

----------

ENV['APP_ROOT'] ||= File.expand_path(File.join(File.dirname(__FILE__), '..'))
APP_ROOT = ENV['APP_ROOT']
script_file = File.join(APP_ROOT, 'lib', 'poller.rb')
tmp_dir = File.join(APP_ROOT, 'tmp')

require 'rubygems'
require 'daemons'

require 'activesupport'
require 'activemessaging'

options = {
  :app_name   => "poller",
  :dir_mode   => :normal,
  :dir        => tmp_dir,
  :multiple   => true,
  :ontop      => false,
  :mode       => :load,
  :backtrace  => true,
  :monitor    => true,
  :log_output => true
}

Daemons.run(script_file,options)

----------

-> require 'activesupport'
At this point, my environment hasn't been loaded yet...

I've changed it to:

gem 'activesupport', '2.3.2'
require 'activesupport'

And it worked fine

Original comment by sandr...@gmail.com on 15 Jul 2010 at 10:04