albertopq / jquery_datepicker

Rails 3 plugin that allows you to select dates from a calendar
91 stars 60 forks source link

Rails 4 compatibility #39

Open hale opened 11 years ago

hale commented 11 years ago

I'm not too sure how to do this, so would gladly welcome some help :)

denvazh commented 11 years ago

I'm also interested in making it compatible with Rails 4. In this very case, reason why it fails to build on Travis CI is because you didn't update Gemfile. For some reason ( at least in my case with current Gemfile) it was like this:

    $: bundle exec rails --version
    Rails 3.2.13

After forcing Rails to be version 4.0.0 in Gemfile it was possible to see that Rails 4 was installed correctly.

    -  gem 'rails'
    +  gem 'rails', '= 4.0.0'

It is also necessary to run bundle update after changing Gemfile.

Making sure, that actually Rails 4 is used

    $: bundle exec rails --version
    Rails 4.0.0

From that point it was possible to run all tests and actually see how all of them fail :)

    $: bundle exec rake spec
    /usr/local/var/rbenv/versions/2.0.0-p195/bin/ruby -S rspec ./spec/jquery_datepicker_spec.rb
    FFFFFFFFFFFFFF....

    Failures:

    [...]

    Finished in 0.15486 seconds
    18 examples, 14 failures

Hope this helps.

Kevin-North commented 11 years ago

I'm working on a new Rails 4 app that might be able to take advantage of your gem. Is there an ETA for when this issue will be resolved?