我用php5-fpm设置了一个nginx服务器.当我尝试加载网站时,我得到一个没有错误的空白页面.Html页面很好,但不是PHP.我尝试在php.ini中打开display_errors但没有运气.php5-fpm.log没有产生任何错误,也不是nginx.
nginx.conf
server {
listen 80;
root /home/mike/www/606club;
index index.php index.html;
server_name mikeglaz.com www.mikeglaz.com;
error_log /var/log/nginx/error.log;
location ~ \.php$ {
#fastcgi_pass 127.0.0.1:9000;
# With php5-fpm:
fastcgi_pass unix:/var/run/php5-fpm.sock;
fastcgi_index index.php;
include fastcgi_params;
}
}
Run Code Online (Sandbox Code Playgroud)
编辑
这是我的nginx错误日志:
2013/03/15 03:52:55 [error] 1020#0: *55 open() "/home/mike/www/606club/robots.txt" failed (2: No such file or directory), client: 199.30.20.40, server: mikeglaz.com, request: "GET /robots.txt HTTP/1.1", host: "mikeglaz.com"
Run Code Online (Sandbox Code Playgroud) describe,context,feature,scenario:什么是四间的差异(一个或多个),做当我使用每一个?
我正在使用bootstrap-sass托马斯麦克唐纳的宝石(Bootstrap 3.0).我遵循了Daniel Kehoe 的
Bootstrap和Rails教程.
我application.css.scss在顶部有以下内容:
/*
*= require_self
*= require_tree .
*/
Run Code Online (Sandbox Code Playgroud)
我有framework_and_overrides.css.scss这条线:
@import "bootstrap";
Run Code Online (Sandbox Code Playgroud)
现在我尝试覆盖$body-bg: #f00;我在这里找到的引导变量()并将它们放在这两个文件中的任何一个但没有任何变化.我究竟做错了什么?
你如何将两个关系加在一起?当我尝试+运算符时,它返回一个数组.但我需要它来回归关系.
谢谢,迈克
我不能让galetahub ckeditor gem为我使用Rails 4.我在网上搜索了任何问题,但找不到任何问题.我完全按照说明操作.
rails generate ckeditor:install --orm=active_record --backend=carrierwaverake db:migrateconfig.autoload_paths += %W(#{config.root}/app/models/ckeditor)mount Ckeditor::Engine => '/ckeditor'<%= f.input :description, as: :ckeditor %>在我的视图中粘贴了以下ERB .我认为就是这样.但由于某种原因,我的文本区域没有转换为CKeditor区域.
我将在http://ruby.railstutorial.org/上阅读Michael Hartl的教程.它基本上是一个留言板应用程序,用户可以发布消息,其他人可以留下回复.现在我正在创造Users.里面的UsersController东西看起来像这样:
class UsersController < ApplicationController
def new
@user = User.new
end
def show
@user = User.find(params[:id])
end
def create
@user = User.new(params[:user])
if @user.save
flash[:success] = "Welcome to the Sample App!"
redirect_to @user
else
render 'new'
end
end
end
Run Code Online (Sandbox Code Playgroud)
作者说以下几行是等价的.这对我有意义:
@user = User.new(params[:user])
is equivalent to
@user = User.new(name: "Foo Bar", email: "foo@invalid",
password: "foo", password_confirmation: "bar")
Run Code Online (Sandbox Code Playgroud)
redirect_to @user重定向到show.html.erb.这究竟是如何工作的?怎么知道去show.html.erb?
我正在阅读ng-bookAngular 5上的Ari Lerner .我正在使用ngx-bootstrap和Bootstrap 4.表格验证似乎没有像勒纳先生那样实施.我不确定这是否是一个限制ngx-bootstrap...任何人都知道?
编辑
好的,我删除了ngx-bootstrap,只是加载了MaxCDNs Bootstrap 4,我有同样的问题.错误消息未出现.
app.module.ts
import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';
import { AppComponent } from './app.component';
import { NavbarComponent } from './navbar/navbar.component';
import { RegistrationFormComponent } from './registration-form/registration-form.component';
import {
FormsModule,
ReactiveFormsModule,
FormBuilder,
FormGroup
} from '@angular/forms';
@NgModule({
declarations: [
AppComponent,
NavbarComponent,
RegistrationFormComponent
],
imports: [
BrowserModule,
FormsModule,
ReactiveFormsModule
],
providers: [],
bootstrap: [AppComponent]
})
export class …Run Code Online (Sandbox Code Playgroud) 我正在阅读Rails 4 in Action.我在使用Rspec和Capybara进行测试时遇到了上述错误.我的viewing_projects_spec.rb看起来像这样:
require 'spec_helper'
feature "Viewing projects" do
scenario "Listing all projectcs" do
project = FactoryGirl.create(:project, name: "TextMate 2")
visit '/'
click_link 'TextMate 2'
expect(page.current_url).to eql(project_url(project))
end
end
Run Code Online (Sandbox Code Playgroud)
其余的错误说Failure/Error: expect(page.current_url).to eql(project_url(project)).
我做了一些谷歌搜索,人们说将以下内容放在config/environments/development.rb中:
Rails.application.routes.default_url_options[:host] = 'localhost:3000'
Run Code Online (Sandbox Code Playgroud)
不幸的是,这没有任何作用.
我正在阅读Rails 3 In Action.这本书建立了一类项目has_many :tickets和一类门票belongs_to :project.routes.rb文件如下所示:
resources :projects do
resources :tickets
end
Run Code Online (Sandbox Code Playgroud)
现在,创建票证的表单采用如下数组:
<%= form_for [@project, @ticket] do |f| %>
Run Code Online (Sandbox Code Playgroud)
在票证show.html.erb页面上有链接,如下所示:
<%= link_to "Edit Ticket", [:edit, @project, @ticket] %>
<%= link_to "Delete Ticket", [@project, @ticket], :method => :delete,
:confirm => "Are you sure you want to delete this ticket?" %>
Run Code Online (Sandbox Code Playgroud)
现在我很困惑为什么需要将两个对象的数组传递给form_for()和link_to().此外,为什么"编辑故障单"需要和:编辑符号,而"删除故障单"不需要:销毁符号.
谢谢,迈克
我有一个Zurb Foundation简单表单,其中一个字段(:description)是一个文本区域.我希望文本区域为10行深,但它显示为2行.有谁知道如何改变这个?
<div class="row">
<div class="large-4 large-centered columns">
<%= simple_form_for(@venue) do |f| %>
<fieldset>
<%= f.input :name %>
<%= f.input :url %>
<%= f.input :street %>
<%= f.input :city %>
<%= f.input :state %>
<%= f.input :description, as: :text, :input_html => { :cols => 5, :rows => 10 } %>
<%= f.submit "Submit", class: "button small radius" %>
</fieldset>
<% end %>
</div>
</div>
Run Code Online (Sandbox Code Playgroud) rspec2 ×2
angular ×1
bootstrap-4 ×1
capybara ×1
ckeditor ×1
css ×1
nginx ×1
php ×1
rspec ×1
rspec-rails ×1
ruby ×1
simple-form ×1