用于Rails 4的mobile_fu [英] mobile_fu for Rails 4

查看:75
本文介绍了用于Rails 4的mobile_fu的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试将我的应用程序从Rails 3.2.13切换到Rails4。这样做是遇到了一个主要问题-我使用gem mobile_fu来确定用户是否来自移动设备。该宝石需要栏杆3.2.13,但是栏杆4.0.2和栏杆4.0.2的sass-rails都需要栏杆> = 4.0。

I'm trying to switch my app from Rails 3.2.13 to Rails 4. In doing so, I've hit one main snag -- I use the gem mobile_fu in order to determine if users are coming from a mobile device. That gem requires railties 3.2.13, but rails 4.0.2 and sass-rails for rails 4.0.2 both require railties >= 4.0.

有什么好的解决方法这个问题?我很高兴研究mobile_fu代码,因为它似乎并不特别棘手,但是我对处理Railty以及依赖Railties的依赖的经验很少。

What's a good way to solve this problem? I'm happy to dig into the mobile_fu code as it doesn't seem particularly tricky, but I have very little experience dealing with railties and what dependencies on railties mean.

谢谢!

推荐答案

您可以在 https://github.com/benlangfeld/mobile-fu

gem'mobile_fu '(带有下划线)会给您旧的。
宝石 mobile-fu为您提供了新的宝石。

gem 'mobile_fu' (with an underscore) gives you the old one. gem 'mobile-fu' gives you the new one.

这篇关于用于Rails 4的mobile_fu的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆