小编pit*_*hip的帖子

如何通过Mac OS X 10.6.8中的终端访问Apache错误日志?

从Rails 3.0升级到3.1后,我在远程计算机上提供rails应用程序时遇到问题.所以我想看看Apache尝试启动我的应用程序时出现了什么问题,但它失败了.如何找到Apache(或者Passenger?)通过终端抛出的错误?

macos apache2 ruby-on-rails-3.1

21
推荐指数
1
解决办法
4万
查看次数

我怎样才能获得best_in_place的respond_with_bip工作?

我在best_in_place完全正常运行方面遇到了麻烦.问题是,一旦我编辑了一个字段,为了能够再次点击并编辑该字段,我需要刷新页面.我可能错了,但我觉得这与respond_with_bip抛出undefined method错误有关.我认为这与不将best_in_place资产放在正确的位置有关.目前我有以下内容可以更新'常量'.但是当它击中时它再次抛出错误respond_with_bip:

节目:

<%= best_in_place constant, :description %>
Run Code Online (Sandbox Code Playgroud)

更新控制器的动作:

def update
  @constant = Constant.find(params[:id])

  respond_to do |format|
    if @constant.update_attributes(params[:constant])
      format.html { 
        flash[:success] = "Constant Updated"
        redirect_to settings_path
      }
      format.json { 
        respond_with_bip(@constant) 
      }
    else
      format.html { 
        flash[:error] = "Constant Update Failed"
        @title = "Constants"
        @constant = Constant.new
        @partial_path = "settings/constants"
        redirect_to settings_path
      }
      format.json { respond_with_bip(@constant) }
    end
  end
end
Run Code Online (Sandbox Code Playgroud)

best_in_placegithub页面的文件夹方面,我将整个lib/best_in_place文件夹放在我的应用程序的app/assets文件夹中.javascript文件在app/assets/javascripts(这些工作,所以不担心它).我把lib/assets/best_in_place.rb文件放在文件 …

ruby-on-rails-3.1 best-in-place

18
推荐指数
1
解决办法
1075
查看次数

如何设置终端脚本在Mac OS X Snow Leopard启动时运行?

您好我使用的是Mac OS X 10.6.8.如何在启动时设置一些简单的终端命令,就像我打开终端并将这些命令放在自己身上一样?我基本上需要在启动时启动一些服务器守护进程.我在终端中使用的命令手动启动它们看起来像sudo ruby myrubyserverscript_control.rb start.如果这是非常显而易见的,或者已经在某种程度上以某种方式在这里得到了解答,我会提前道歉.

macos terminal startup

10
推荐指数
2
解决办法
3万
查看次数