Bruno - Many thanks. The problem was with the environment.rb file. I
followed the installation directions on the CE site exactly, but there
was no mention of the CE/engines specific lines that go under the
"#Bootstrap" or "Rails::Initializer" sections. Once I added those
lines, "script/generate plugin_migration" and "rake db:migrate" went
smoothly.
I did, however, run into problems when running the tests. "rake
db:test:prepare" went fine, but "rake community_engine:test" produced
one failure and one error. Wondering if things will still run properly
with these errors. Here is the (error specific) output:
1) Failure:
test_should_get_clipping_image(ClippingTest)
[./vendor/plugins/community_engine/test/functional/../
test_helper.rb:25:in `assert_difference'
./vendor/plugins/community_engine/test/unit/clipping_test.rb:
38:in `test_should_get_clipping_image'
/usr/lib/ruby/gems/1.8/gems/activesupport-2.1.0/lib/
active_support/testing/setup_and_teardown.rb:33:in `__send__'
/usr/lib/ruby/gems/1.8/gems/activesupport-2.1.0/lib/
active_support/testing/setup_and_teardown.rb:33:in `run']:
<4> expected but was
<1>.
2) Error:
test_should_get_index(StatisticsControllerTest):
ActionView::TemplateError: You don't need to use "- end" in Haml. Use
indentation instead:
- if foo?
%strong Foo!
- else
Not foo.
On line #21 of vendor/plugins/community_engine/app/views/
statistics/index.html.haml
18: - @today_new_users.each do |user|
19: %li
20: = link_to user.login, user_path(user)
21: - end
22: %h3
23: New yesterday:
24: = @yesterday_new_users.size
vendor/plugins/community_engine/app/views/statistics/
index.html.haml:21
/usr/lib/ruby/gems/1.8/gems/haml-2.0.3/lib/haml/precompiler.rb:
202:in `process_line'
/usr/lib/ruby/gems/1.8/gems/haml-2.0.3/lib/haml/precompiler.rb:
152:in `precompile'
/usr/lib/ruby/gems/1.8/gems/activesupport-2.1.0/lib/active_support/
inflector.rb:283:in `each_with_index'
/usr/lib/ruby/gems/1.8/gems/haml-2.0.3/lib/haml/precompiler.rb:
118:in `each'
/usr/lib/ruby/gems/1.8/gems/haml-2.0.3/lib/haml/precompiler.rb:
118:in `each_with_index'
/usr/lib/ruby/gems/1.8/gems/haml-2.0.3/lib/haml/precompiler.rb:
118:in `precompile'
/usr/lib/ruby/gems/1.8/gems/haml-2.0.3/lib/haml/engine.rb:100:in
`initialize'
/usr/lib/ruby/gems/1.8/gems/haml-2.0.3/lib/haml/template/plugin.rb:
21:in `new'
/usr/lib/ruby/gems/1.8/gems/haml-2.0.3/lib/haml/template/plugin.rb:
21:in `compile'
/usr/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_view/
template_handlers/compilable.rb:98:in `create_template_source'
/usr/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_view/
template_handlers/compilable.rb:37:in `compile_template'
/usr/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_view/
template.rb:55:in `prepare!'
/usr/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_view/
template.rb:34:in `render'
/usr/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_view/
template.rb:22:in `render_template'
/usr/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_view/
base.rb:245:in `render_file'
/usr/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/
base.rb:1108:in `render_for_file'
/usr/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/
base.rb:841:in `render_with_no_layout'
/usr/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/
layout.rb:251:in `render_without_benchmark'
/usr/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/
benchmarking.rb:51:in `render'
/usr/lib/ruby/gems/1.8/gems/activesupport-2.1.0/lib/active_support/
core_ext/benchmark.rb:8:in `realtime'
/usr/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/
benchmarking.rb:51:in `render'
/usr/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/
base.rb:1157:in `default_render'
/usr/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/
base.rb:1163:in `perform_action_without_filters'
/usr/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/
filters.rb:580:in `call_filters'
/usr/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/
filters.rb:601:in `run_before_filters'
vendor/plugins/community_engine/lib/localized_application.rb:21:in
`set_locale'
/usr/lib/ruby/gems/1.8/gems/activesupport-2.1.0/lib/active_support/
callbacks.rb:173:in `send'
/usr/lib/ruby/gems/1.8/gems/activesupport-2.1.0/lib/active_support/
callbacks.rb:173:in `evaluate_method'
/usr/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/
filters.rb:395:in `call'
/usr/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/
filters.rb:598:in `run_before_filters'
/usr/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/
filters.rb:578:in `call_filters'
/usr/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/
filters.rb:573:in `perform_action_without_benchmark'
/usr/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/
benchmarking.rb:68:in `perform_action_without_rescue'
/usr/lib/ruby/1.8/benchmark.rb:293:in `measure'
/usr/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/
benchmarking.rb:68:in `perform_action_without_rescue'
/usr/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/
rescue.rb:201:in `perform_action_without_caching'
/usr/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/
caching/sql_cache.rb:13:in `perform_action'
/usr/lib/ruby/gems/1.8/gems/activerecord-2.1.0/lib/active_record/
connection_adapters/abstract/query_cache.rb:33:in `cache'
/usr/lib/ruby/gems/1.8/gems/activerecord-2.1.0/lib/active_record/
query_cache.rb:8:in `cache'
/usr/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/
caching/sql_cache.rb:12:in `perform_action'
/usr/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/
base.rb:529:in `send'
/usr/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/
base.rb:529:in `process_without_filters'
/usr/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/
filters.rb:569:in `process_without_session_management_support'
/usr/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/
session_management.rb:130:in `sass_old_process'
/usr/lib/ruby/gems/1.8/gems/haml-2.0.3/lib/sass/plugin/rails.rb:
19:in `process_without_test'
/usr/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/
test_process.rb:16:in `process'
/usr/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/
test_process.rb:394:in `process'
/usr/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/
test_process.rb:365:in `get'
vendor/plugins/community_engine/test/functional/
statistics_controller_test.rb:18:in `test_should_get_index'
/usr/lib/ruby/gems/1.8/gems/activesupport-2.1.0/lib/active_support/
testing/setup_and_teardown.rb:33:in `__send__'
/usr/lib/ruby/gems/1.8/gems/activesupport-2.1.0/lib/active_support/
testing/setup_and_teardown.rb:33:in `run'
/usr/lib/ruby/1.8/test/unit/testsuite.rb:34:in `run'
/usr/lib/ruby/1.8/test/unit/testsuite.rb:33:in `each'
/usr/lib/ruby/1.8/test/unit/testsuite.rb:33:in `run'
/usr/lib/ruby/1.8/test/unit/testsuite.rb:34:in `run'
/usr/lib/ruby/1.8/test/unit/testsuite.rb:33:in `each'
/usr/lib/ruby/1.8/test/unit/testsuite.rb:33:in `run'
/usr/lib/ruby/1.8/test/unit/ui/testrunnermediator.rb:46:in
`run_suite'
/usr/lib/ruby/1.8/test/unit/ui/console/testrunner.rb:67:in
`start_mediator'
/usr/lib/ruby/1.8/test/unit/ui/console/testrunner.rb:41:in `start'
/usr/lib/ruby/1.8/test/unit/ui/testrunnerutilities.rb:29:in `run'
/usr/lib/ruby/1.8/test/unit/autorunner.rb:200:in `run'
/usr/lib/ruby/1.8/test/unit/autorunner.rb:13:in `run'
/usr/lib/ruby/1.8/test/unit.rb:278
/usr/lib/ruby/gems/1.8/gems/rake-0.8.2/lib/rake/
rake_test_loader.rb:5
463 tests, 869 assertions, 1 failures, 1 errors
rake aborted!
On Sep 26, 11:12 pm, "Bruno Bornsztein" <[EMAIL PROTECTED]>
wrote:
> Looks like the Engines plugin can't find the CE plugin, you're getting a
> null pointer on #69 of routing.rb (in Engines):
>
> routes_path = Engines.plugins[name].routes_path
>
> This is called from your routes.rb (where you do map.from_plugin
> :community_engine).
>
> Are you certain that your environment.rb is set up correctly? It should
> include something like the following:
>
> RAILS_GEM_VERSION = '2.1.0' unless defined? RAILS_GEM_VERSION
>
> # Bootstrap the Rails environment, frameworks, and default configuration
> require File.join(File.dirname(__FILE__), 'boot')
> require File.join(File.dirname(__FILE__), '../vendor/plugins/engines/boot')
>
> Rails::Initializer.run do |config|
> config.plugins = [:engines, :community_engine, :white_list, :all]
> config.plugin_paths +=
> ["#{RAILS_ROOT}/vendor/plugins/community_engine/engine_plugins"]
>
> Also, make sure you have a directory in vendor/plugins called
> 'community_engine' (note the underscore).
>
> On Fri, Sep 26, 2008 at 9:08 AM, Jonathan <[EMAIL PROTECTED]> wrote:
>
> > @Tibo - The error is exactly the same, except now with 2.1.0 as
> > opposed to 2.1.1 - This leads me to believe that the initial problem
> > had nothing to do with what version of Rails I have, especially
> > considering Thanh Doan got CE working with 2.1.1
>
> > gem version is 1.2.0
> > rails version is (now) 2.1.0
>
> > script/about output:
>
> > /home/nimblecraft/public_html/nimbleSNS/vendor/plugins/engines/lib/
> > engines/rails_extensions/routing.rb:69:in `from_plugin': You have a
> > nil object when you didn't expect it! (NoMethodError)
> > The error occurred while evaluating nil.routes_path from /home/
> > nimblecraft/public_html/nimbleSNS/config/routes.rb:39
> > from /usr/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/
> > action_controller/routing/route_set.rb:207:in `draw'
> > from /home/nimblecraft/public_html/nimbleSNS/config/routes.rb:1
> > from /usr/lib/ruby/gems/1.8/gems/activesupport-2.1.0/lib/
> > active_support/dependencies.rb:502:in `load'
> > from /usr/lib/ruby/gems/1.8/gems/activesupport-2.1.0/lib/
> > active_support/dependencies.rb:502:in `load'
> > from /usr/lib/ruby/gems/1.8/gems/activesupport-2.1.0/lib/
> > active_support/dependencies.rb:354:in `new_constants_in'
> > from /usr/lib/ruby/gems/1.8/gems/activesupport-2.1.0/lib/
> > active_support/dependencies.rb:502:in `load'
> > from /usr/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/
> > action_controller/routing/route_set.rb:253:in `load_routes!'
> > ... 9 levels...
> > from
> > /usr/lib/ruby/gems/1.8/gems/rails-2.1.0/lib/commands/about.rb:1
> > from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
> > `gem_original_require'
> > from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
> > `require'
> > from script/about:3
>
> > On Sep 26, 3:40 pm, "Thanh Doan" <[EMAIL PROTECTED]> wrote:
> > > I installed ubuntu 8.04, gem 1.2.0, rails 2.1.1 and managed to get CE
> > > working.
>
> > > pls run gem -v to double check your gem version.
>
> > > The only thing I changed is to move
> > > APP_URL = "http://localhost:3000" to the top of the development.rb and
> > > test.rb files
>
> > > On Fri, Sep 26, 2008 at 1:23 AM, Jonathan <[EMAIL PROTECTED]> wrote:
>
> > > > Getting the same error as above, even after uninstalling Rails 2.1.1
> > > > and replacing it with 2.1.0 - Guessing that is not the issue then?
>
> > > > On Sep 26, 3:54 am, Jonathan <[EMAIL PROTECTED]> wrote:
> > > > > Many thanks.
>
> > > > > On Sep 26, 3:41 am, "Bruno Bornsztein" <[EMAIL PROTECTED]>
> > > > > wrote:
>
> > > > > > gem uninstall -h
> > > > > > gem install -h
>
> > > > > > On Thu, Sep 25, 2008 at 1:40 PM, Jonathan <[EMAIL PROTECTED]>
> > wrote:
>
> > > > > > > Hrm, I see. Forgive me if this is a stupid question (being a RoR
> > > > > > > newbie) - is it possible roll back my version of Rails to 2.1.0?
>
> > > > > > > On Sep 26, 3:30 am, "Bruno Bornsztein" <
> > [EMAIL PROTECTED]>
> > > > > > > wrote:
> > > > > > > > You're using Rails 2.1.1: CE is not yet compatible with that
> > > > version
> > > > > > > (we're
> > > > > > > > still on 2.1.0). Also, I think the Engines plugin hasn't been
> > > > upgraded to
> > > > > > > > that version yet.
>
> > > > > > > > On Thu, Sep 25, 2008 at 1:28 PM, Jonathan <[EMAIL PROTECTED]>
> > > > wrote:
>
> > > > > > > > > Did a search before posting this, but didn't see anything
> > that
> > > > > > > > > addressed this particular issue. I'm getting the following
> > error
> > > > when
> > > > > > > > > running the "script/generate plugin_migration" command:
>
> > > > /home/nimblecraft/public_html/nimbleSNS/vendor/plugins/engines/lib/
> > > > > > > > > engines/rails_extensions/routing.rb:69:in `from_plugin': You
> > have
> > > > a
> > > > > > > > > nil object when you didn't expect it! (NoMethodError)
> > > > > > > > > The error occurred while evaluating nil.routes_path from
> > > > /home/
> > > > > > > > > nimblecraft/public_html/nimbleSNS/config/routes.rb:39
> > > > > > > > > from /usr/lib/ruby/gems/1.8/gems/actionpack-2.1.1/lib/
> > > > > > > > > action_controller/routing/route_set.rb:207:in `draw'
> > > > > > > > > from
> > > > /home/nimblecraft/public_html/nimbleSNS/config/routes.rb:1
> > > > > > > > > from
> > /usr/lib/ruby/gems/1.8/gems/activesupport-2.1.1/lib/
> > > > > > > > > active_support/dependencies.rb:503:in `load'
> > > > > > > > > from
> > /usr/lib/ruby/gems/1.8/gems/activesupport-2.1.1/lib/
> > > > > > > > > active_support/dependencies.rb:503:in `load'
> > > > > > > > > from
> > /usr/lib/ruby/gems/1.8/gems/activesupport-2.1.1/lib/
> > > > > > > > > active_support/dependencies.rb:355:in `new_constants_in'
> > > > > > > > > from
> > /usr/lib/ruby/gems/1.8/gems/activesupport-2.1.1/lib/
> > > > > > > > > active_support/dependencies.rb:503:in `load'
> > > > > > > > > from /usr/lib/ruby/gems/1.8/gems/actionpack-2.1.1/lib/
> > > > > > > > > action_controller/routing/route_set.rb:253:in `load_routes!'
> > > > > > > > > ... 9 levels...
> > > > > > > > > from
>
> > /usr/lib/ruby/gems/1.8/gems/rails-2.1.1/lib/commands/generate.rb:
> > > > > > > > > 1
> > > > > > > > > from
> > > > > > > /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
> > > > > > > > > `gem_original_require'
> > > > > > > > > from
> > > > > > > /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
> > > > > > > > > `require'
> > > > > > > > > from script/generate:3
>
> > > > > > > > > Thoughts? Suggestions? Not sure what to do at this point.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"CommunityEngine" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/communityengine?hl=en
-~----------~----~----~----~------~----~------~--~---