Closed mattharrison closed 10 years ago
If you want to run tests then at first install bundler and all necessary gems from Gemfile
gem install bundler
bundle install
and then use rake spec
to tun all tests or rspec spec/cube_spec.rb
to run individual test file. Also see https://github.com/rsim/mondrian-olap/blob/master/RUNNING_TESTS.rdoc for all preconditions for running tests.
If you want to try to use mondrian-olap then it is better to use mondrian-olap demo Rails app https://github.com/rsim/mondrian_demo
So don't run jruby -S gem install bundler
? I should be using (c)ruby gem
?
Hmm, I seemed to have progressed a little When I try to run the rake task it claims it can't find mondrian/olap
$ jruby -S rake
/home/mharrison/work/jruby/jruby-1.6.5/bin/jruby -S rspec ./spec/cube_spec.rb
LoadError: no such file to load -- mondrian/olap
Yet
$ jruby -S gem list
*** LOCAL GEMS ***
activemodel (3.0.10)
activerecord (3.0.10)
activerecord-jdbc-adapter (1.1.1)
activerecord-oracle_enhanced-adapter (1.4.0)
activesupport (3.0.10)
arel (2.0.10)
autotest (4.4.6)
bouncy-castle-java (1.5.0146.1)
builder (2.1.2)
bundler (1.0.21)
diff-lcs (1.1.3)
git (1.2.5)
i18n (0.5.0)
jdbc-jtds (1.2.5 java)
jdbc-luciddb (0.9.3)
jdbc-mysql (5.1.13)
jdbc-postgres (9.0.801)
jeweler (1.6.4, 1.5.2)
jruby-openssl (0.7.4)
json (1.6.1 java)
mondrian-olap (0.3.0)
nokogiri (1.5.0 java)
rake (0.9.2.2, 0.8.7)
rdoc (3.11)
rspec (2.7.0)
rspec-core (2.7.1)
rspec-expectations (2.7.0)
rspec-mocks (2.7.0)
sources (0.0.1)
tzinfo (0.3.31)
ZenTest (4.6.2)
I'm quite confused
Update
Ok, sorry for the noise, apparently since I'm making my own cube, I need to have mondrian-olap.gemspec and the lib file from mondrian-olap.
I use rvm
to install jruby and therefore my gem
and rake
commands will actually use jruby.
In your case you probably need to run
jruby -S bundle install
jruby -S bundle exec rake spec
to run tests.
If you want to use mondrian-olap gem in your application then include it in your app's Gemfile, see example - https://github.com/rsim/mondrian_demo/blob/master/Gemfile (there I use latest version from github but you can specify also released version 0.3.0 which will use rubygems version).
And then see example https://github.com/rsim/mondrian_demo/blob/master/app/models/Dwh.rb how to define cube schema and https://github.com/rsim/mondrian_demo/blob/master/app/controllers/mdx_controller.rb how to execute queries that are entered from user interface (see sample queries at https://github.com/rsim/mondrian_demo/blob/master/README.md)
Closing old issue.
I'm pretty much a newbie to (j)ruby. I figured I'd try to get cube_spec.rb to run, and use that as a model during development.
When I try to run it I get the following:
From my grokking, it looks like
bundler
is missing, yet gems claims it isn't :I know this is slightly OT, but I just need help getting the environment figured out (ie do I need to use rvm)?