Forum: Ruby on Rails calendar_date_select_includes not found

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Bd4c152cdbb373a32ee24d0990cb52d2?d=identicon&s=25 Steven Line (sline)
on 2008-12-08 05:06
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!
A1b97dafea62b11e7b3bef338ce3fe83?d=identicon&s=25 Billy Hsu (cfc)
on 2008-12-08 10:58
(Received via mailing list)
After you edit any files in config folder, please restart your
server(Like
Mongrel or Webrick), try again :)

On Mon, Dec 8, 2008 at 12:06 PM, Steven Line <
rails-mailing-list@andreas-s.net> 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
Bd4c152cdbb373a32ee24d0990cb52d2?d=identicon&s=25 Steven Line (sline)
on 2008-12-08 15:30
Billy Hsu wrote:
> After you edit any files in config folder, please restart your
> server(Like
> Mongrel or Webrick), try again :)

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:in `require'
  from init.rb:1
This topic is locked and can not be replied to.