小编Raf*_*afi的帖子

在生产中使用jquery-ui-rails gem时,Heroku找不到jquery.ui

我正在使用jquery-ui-rails gem.它在本地主机上工作正常,但当我推送到heroku时,它给heroku日志显示:

2012-04-11T02:28:59+00:00 app[web.1]: ActionView::Template::Error (couldn't find file 'jquery.ui.slider'
2012-04-11T02:28:59+00:00 app[web.1]:   (in /app/app/assets/stylesheets/application.css:12)):
Run Code Online (Sandbox Code Playgroud)

我的生产配置文件:

config.cache_classes = true

config.consider_all_requests_local       = false
config.action_controller.perform_caching = true

config.serve_static_assets = true

config.assets.compress = true

config.assets.compile = true

config.assets.digest = true
Run Code Online (Sandbox Code Playgroud)

网上的一些问题说改为config.assets.compile假,但当我这样做时,我得到一个application.css not precompiled错误.

jquery-ui ruby-on-rails heroku

9
推荐指数
1
解决办法
4369
查看次数

fb.Login()窗口立即关闭并返回'not_authorized'

我在我的网站上使用FB JDK启用了FB登录.当我使用它时,它完美地工作:对话框窗口打开,我授权,并且authResponse正如预期的那样.当另一个用户使用它(尚未授权应用程序但登录到FB)时,登录对话框会短暂显示,并立即消失,并且响应对象具有状态not_authorized.关于为什么对话框可能不会要求用户授权的任何想法?

在我的布局中(Haml):

%body
  #fb-root
  :javascript
    window.fbAsyncInit = function() {
      FB._https = false;
      FB.init({
        appId      : <App ID>
        status     : true,
        cookie     : true,
        oauth      : true,
        xfbml      : true
      });
      FB.getLoginStatus(function(response) {
        if(window.reportFBstatus) {
          reportFBstatus(response);
        }
      }, true);
    };
    // Load the SDK
    (function(d){
     var js, id = 'facebook-jssdk', ref = d.getElementsByTagName('script')[0];
     if (d.getElementById(id)) {return;}
     js = d.createElement('script'); js.id = id; js.async = true;
     js.src = "//connect.facebook.net/en_US/all.js";
     ref.parentNode.insertBefore(js, ref);
    }(document));
Run Code Online (Sandbox Code Playgroud)

登录链接:

%a{href: '#', onclick: 'FB.login(window.reportFBstatus, …
Run Code Online (Sandbox Code Playgroud)

facebook ruby-on-rails facebook-javascript-sdk

7
推荐指数
1
解决办法
1422
查看次数