Wamp服务器无法启动(橙色图标)(Wamp server can't start (orange icon))
我无法在win7上启动wamp服务器。 我正在使用vhosts,一切都很好,直到我重新启动wamp服务器。
的httpd-vhost.conf:
<VirtualHost *:80> ServerAdmin *.*@*.com DocumentRoot "C:\Users\Rossko\Documents\PHP\wamp\www\***.local" ServerName ***.local ErrorLog "C:\Users\Rossko\Documents\PHP\wamp\apache\apache2.4.9\logs\***.local-error.log" CustomLog "C:\Users\Rossko\Documents\PHP\wamp\apache\apache2.4.9\logs\***.local-access.log" common
在Apache错误日志中没有任何东西,端口80是空的。 为什么仍然是橙色而未能启动? 任何想法? 我在httpd-vhost.conf中有比www /文件夹中的项目更多的虚拟主机(没有足够的时间进行复制)是否可能由此引起错误?
I can't start wamp server on win7. I'm using vhosts, everything was fine untill I restart wamp server.
httpd-vhost.conf:
<VirtualHost *:80> ServerAdmin *.*@*.com DocumentRoot "C:\Users\Rossko\Documents\PHP\wamp\www\***.local" ServerName ***.local ErrorLog "C:\Users\Rossko\Documents\PHP\wamp\apache\apache2.4.9\logs\***.local-error.log" CustomLog "C:\Users\Rossko\Documents\PHP\wamp\apache\apache2.4.9\logs\***.local-access.log" common
in Apache error log is nothing and port 80 is empty. Why is still orange and failed to start? Any idea? I have more virtual hosts in httpd-vhost.conf than projects in www/ folder (not enough time for copy) Is it possible that the error is coused by this?
原文:https://stackoverflow.com/questions/26105647
最满意答案
您可以通过使用
:items
而不是:some_model_a_sub_model_items
作为关系的名称来实现此目的,并使用:class_name
参数显式指定要引用的类的名称:# An ActiveRecord Class named SomeModelASubModel (some_model_a_sub_model.rb) class SomeModelASubModel < ActiveRecord::Base has_many :items, :class_name => "SomeModelASubModelItems" end
有关详细信息,请参阅ActiveRecord文档 。
You could achieve this by using
:items
instead of:some_model_a_sub_model_items
as the name of the relation, and explicitly specifying the name of the class you're referring to using the:class_name
parameter:# An ActiveRecord Class named SomeModelASubModel (some_model_a_sub_model.rb) class SomeModelASubModel < ActiveRecord::Base has_many :items, :class_name => "SomeModelASubModelItems" end
See the ActiveRecord docs for more info.
相关问答
更多-
您的问题可能是attributes是一个实例方法,您在类的上下文中执行此操作。 最接近你想要的类方法是column_names 。 Your problem is probably that attributes is an instance method and you're doing this in the context of the class. The class method that's closest to what you want is column_names.
-
我认为您的问题是您给出的别名“:class”类是您可以通过运行此命令看到它的ActiveRecord方法之一 Contractor.first.methods 定义此别名只是以某种方式“覆盖”它并中断到rails操作 So, there is the gem safe_attributes who is doing the work. It's working perfectly so far.
-
精确目标中的别名标记可以设置在链接上,以便在多次使用单个网址(通常是不同区域)的情况下跟踪对特定链接的响应。 The alias tag in Exact Target can be set on links to track response to specific link in the cases where single urls is used multiple times (typically different areas) of the email.
-
属性的别名(Alias for an attribute)[2024-03-06]
x , y和z是Apples构造函数中的可变阴影 (或别名 )。 你可以用this来解决它。 喜欢 private Array[] x; // <-- attribute named x private String y; // <-- attribute named y private String z; // <-- attribute named z public Apples(String y, // <-- parameter named y S ... -
Arel(进行SQL查询的那个)仍然不知道ActiveRecord的别名(最多3.0.3)。 在这种情况下,您应该确保使用原始名称LoginId进行查询。 如果您进入控制台并创建User.where(:username =>“root”),您会看到它生成错误,尽管User.username运行良好。 现在只需替换sinup表单上的用户名出现,直到上游开始支持它。 编辑:顺便说一句,建议的方法是做一个观点 ! 别忘了! http://www.slideshare.net/napcs/rails-and-leg ...
-
如果我没有记错,对象是通过引用传递的,但是如果你不克隆它们,它们会引用同一个对象。 原始物不是。 所以如果你有以下情况: var obj1 = { "id" : 7 }; var obj2 = { "one" : "a", "two" : "a", "three" : obj1, "four" : obj1 }; console.log(obj2.three === obj2.four) // -- > true 由于obj1是一个对象,并且您不克隆它,所以obj2 ...
-
在./libs/Sema/SemaDeclAttr.cpp您将获得ProcessDeclAttributte函数。 在那里你会发现一个巨大的switch语句,你必须为你的属性添加一个case 。 当在代码中找到要编译的属性时, ProcessDeclAttribute是主调度函数。 在这里,您可以添加代码以指定clang对属性的反应。 断言指出了你的问题: Assertion failed: (Attr.isTypeAttr() && "Non-type attribute not handled"), f ...
-
只需直接访问该属性,如下所示: def fooattr_raw self.attributes["fooattr"] end def fooattr add_feature_to fooattr_raw end Simply access the attribute directly like so: def fooattr_raw self.attributes["fooattr"] end def fooattr add_feature_to fooattr_raw end
-
Rails属性别名(Rails attribute alias)[2022-07-23]
您可以通过使用:items而不是:some_model_a_sub_model_items作为关系的名称来实现此目的,并使用:class_name参数显式指定要引用的类的名称: # An ActiveRecord Class named SomeModelASubModel (some_model_a_sub_model.rb) class SomeModelASubModel < ActiveRecord::Base has_many :items, :class_name => "SomeModel ... -
alias_attribute vs read_attribute和write_attribute(alias_attribute vs read_attribute and write_attribute)[2022-04-30]
该错误是因为您在where子句中使用了一个不存在的列。 您还需要定义alias_attribute for sale# to sale_number 。 在您的模型中,您可以: class Product < ActiveRecord::Base alias_attribute :sale_number, :"sale#" def self.helper_with_attribute where(sale_number: 5) end end 有了这个,您不需要仅为分配和检索目的定义 ...