-
Notifications
You must be signed in to change notification settings - Fork 56
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
(NameError) uninitialized constant Java::BacktypeStorm::Config::CONFIG #7
Comments
Hi Stone, I am not sure I understand what you are trying to do here. It seems you are trying to use RedStorm from within Rails? I did not test RedStorm with Rail nor Bundler. Check the RedStorm README for instructions on how to use gems with RedStorm. I think you should try to keep your RedStorm project separate from Rails. Is there any specific reason for this? Do you need to share Rails code (models?) Colin |
Hi Colin, Sorry for the confusion. I am not using redstorm from within Rails. I setup a sperate project and the aforementioned Finally I figured out the problem: in Gemfile of the redstorm project, there's one line like following :
And this line caused the weird uninitialized constant Java::BacktypeStorm::Config::CONFIG error. After changing that line to:
Bundler works like a charm now with redstorm. (But the error message of JRuby is indeed confusing and weird) RedStorm README suggested put gems in target/gems/, since Bundler works well with redstorm, is it possible for redstorm to use Bundler managing gems and puts them in vendor/cache ? Stone |
Ok! Sure, making RedStorm work with bundler is on my todo. Btw, using bundler like this will work using the local cluster but will not work on a remote production cluster unless the gems are installed in target/gems. For gem to be available on the remote production servers, they must be packaged into the "production" jar file. |
Look like java_import was introducing a class overwrite for 'Config', when `rbconfig` needed to be used (Config::CONFIG), the error would surface. rbconfig is used with rack utils.
@stonegao please check out my pull request. there's a good chance that the original cause wasn't the require statement that you found. |
Tried redstorm with other extra gems dependencies (Mongoid, Resque), I start topology using the following command:
RACK_ENV=development redstorm local lib/redstorm-topology/event_topology.rb
But it throw uninitialized constant Java::BacktypeStorm::Config::CONFIG error. Also I am using Mac OS X but the JRuby stack trace has some weird lines related with WIN32API:
I am using Bundler to manage gem dependencies, boot.rb is just copy & paste from rails:
BTW: I think it's great if you can create a redstorm starter project to demonstrate the project source code layout, how to manage dependencies and how to using JRuby with Java together to develop storm topologies. (redstorm it's self is a great example, but another one which focus on the usage of redstorm is awesome).
Thanks for your help
Stone
The text was updated successfully, but these errors were encountered: