Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Including kaminari-sinatra attempts to read translation files from padrino gem #7

Open
maca opened this issue Jul 3, 2018 · 4 comments

Comments

@maca
Copy link

maca commented Jul 3, 2018

I am not using padrino in my new Sinatra app. But including kaminari-sinatra attempts somehow to read translation files from padrino.

Is the padrino-helpers depencency necesary?

This is when I run my previously passing specs after adding kaminari-sinatra into my gemfile.

3) Admin voucher management vouchers listing authenticated admin visits it paginates vouchers navigate to the next page behaves like lists n vouchers lists 5 vouchers
    Failure/Error: name { Faker::Name.name }                                                           
                                                                                                                                                                                                                                              
     I18n::InvalidLocaleData:                                                                        
       can not load translations from /usr/lib/ruby/gems/2.5.0/gems/padrino-core-0.9.21/lib/padrino-core/locale/cz.yml: #<Psych::SyntaxError: (/usr/lib/ruby/gems/2.5.0/gems/padrino-core-0.9.21/lib/padrino-core/locale/cz.yml): did not find 
expected node content while parsing a flow node at line 15 column 13>                                        
     Shared Example Group: "lists n vouchers" called from ./spec/features/admin/voucher_management_spec.rb:39
@yuki24
Copy link
Member

yuki24 commented Jul 3, 2018

It's always nice to drop dependencies. Sinatra is very minimal and doesn't implement methods that Kaminari depends on. I was not part of the team when the padrino-helpers gem was added in the first place, but my hunch is that some dependencies were added just to get things out the door. It would be greatly appreciated if you could contribute back to the community.

@maca
Copy link
Author

maca commented Jul 3, 2018

@yuki24 thanks for your reply, I couldn't get to get kaminari-sinatra working with my app, I still don't know if it has to do with my use of faker which injects i18n gem. I will look further and see if I could find the time to attempt to replace the padrino-helpers methods.

@yuki24
Copy link
Member

yuki24 commented Jul 5, 2018

padrino-core-0.9.21 looks quite old. I wonder if that should be a more recent version, possibly the latest version otherwise some compatibility issue may arise.

@caiodsc
Copy link

caiodsc commented Dec 30, 2018

Steps to resolve:

gem install padrino-core
gem install padrino-helpers
Go to kaminari-sinatra gem folder
Find the folder called "Gemfiles"
There are some .gemfile files
Change gem 'padrino-helpers' ~> 0.12.0 for gem 'padrino-helpers'

End

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants