Calendar_date_select_includes not found


#1

Hi -

I tried to install the calendar_date_select date picker and it doesn’t
work for me. I get this error:

undefined local variable or method `calendar_date_select_includes’ for
#ActionView::Base:0x2640314

Here’s what I did:

sudo gem install calendar_date_select
sudo gem install hoe # because after the above command I couldn’t start
my server

after installing hoe I can now start my server

Then in my environment.rb I put:
config.gem “calendar_date_select”

And this in my template file:
<%= javascript_include_tag “prototype” %>
<%= calendar_date_select_includes %> # it’s erroring on this line. It
doesn’t know where to find calendar_date_select_includes

Even though calendar_date_select is in my gems directory my app isn’t
picking it up. How do I debug something like this? And does anybody
have any suggestions for a fix?

Thanks for any help!


#2

After you edit any files in config folder, please restart your
server(Like
Mongrel or Webrick), try again :slight_smile:

On Mon, Dec 8, 2008 at 12:06 PM, Steven L. <
removed_email_address@domain.invalid> wrote:

<%= calendar_date_select_includes %> # it’s erroring on this line. It


TWRUG Blog:
http://blog.rubyonrails.org.tw

CFC on Rails:
http://zusocfc.blogspot.com

Only two surfaces of a box:
http://blog.pixnet.net/zusocfc


#3

Billy H. wrote:

After you edit any files in config folder, please restart your
server(Like
Mongrel or Webrick), try again :slight_smile:

I’ve restarted several times.

I see the calendar_date_select_includes method in my gems directory
/usr/local/lib/ruby/gems/1.8/gems/calendar_date_select-1.13/lib/calendar_date_select/includes_helper.rb

  1. How do I configure my rails app to find this code? When I installed
    the gem it installed fine so I’d expect my app to be able to find it.

  2. The difference between extensions, plugins, and gems isn’t clear to
    me. Do they all have an init.rb and how is the init.rb run? If I run
    the init.rb in
    /usr/local/lib/ruby/gems/1.8/gems/calendar_date_select-1.13 I get these
    errors but maybe I’m running it wrong. I was just thinking that the
    init.rb might cause rails apps to find this gem:

./lib/calendar_date_select.rb:1:in require': no such file to load -- calendar_date_select/calendar_date_select.rb (LoadError) from ./lib/calendar_date_select.rb:1 from init.rb:1:inrequire’
from init.rb:1