我正在运行一个RoR应用程序(rails 2.3.8,ruby 1.8.7),应用程序在我的本地计算机上正常运行.但在生产时,日志显示以下错误:
ActionView::TemplateError (Missing template folder/_file_name.erb in view path app/views) on line #19 of app/views/layouts/main.rhtml:
19: <%= render :partial => "folder/file_name" -%>
Run Code Online (Sandbox Code Playgroud)
文件名存在folder/_file_name.html.erb
,我试图重现生产环境上的问题,但没有任何运气,由于某种原因导轨应用程序folder/_file_name.erb
在某些时候要求,而其他时候它搜索正确的文件folder/_file_name.html.erb
.
有人可以向我解释发生了什么事吗?
对于.rhtml文件,rails应用程序请求.erb有时也会出现同样的情况,而其他人则获得正确的.rhtml文件
更新:
<%= render :partial => "shared/meta_tags" -%>
<%= render :partial => "shared/common_resources" -%>
<%= render :partial => 'shared/ads/oas' -%>
Run Code Online (Sandbox Code Playgroud)
关于这个问题的任何指示都会有所帮助,在此先感谢
我compctl -K _my_cpl ls
用来挂钩我的自动完成功能来ls
命令.该函数返回索引文件中的名称列表.
但是,zsh总是在每次完成后添加一个空格.如果我想自动完成多级目录,我每次都要删除一个空格.有没有办法像-o nospace
bash complete命令中的选项一样删除额外的空间?
我测试了zstyle ':completion:*' add-space false
命令,它不起作用.谢谢.
_my_cpl() {
local cur last opts
# current word in command line.
read -cA cur
last=$cur[-1]
# grep all directories and file names under current directory level.
opts=`egrep "${last}[^/]*[$|/]*" ~/index -o |uniq`
reply=($=opts)
}
compctl -K _my_cpl ls
Run Code Online (Sandbox Code Playgroud) 任何人都可以帮我在mac Mountain上安装JDK 8吗?
我安装了java_for_os_x_2013002_dp__11m4203.dmg
,我可以看到: /Library/Java/JavaVirtualMachines/jdk1.8.0.jdk/Contents/Home
.但不知道还有什么可做的.
如何为新版本创建符号链接等?
我使用Eclipse和maven所以我不希望与它们发生任何冲突.我是一个新的mac用户.
JDK 7已经安装在我的mac上,但我只是想用新的lambda表达式做一些实验.
谢谢你的帮助
我一直在使用Android Studio,直到我更新到0.2.6.现在,我无法编译或创建新项目.
怎么了? 我不确定,但我认为Android Studio不知道我的sdk文件夹在哪里(我的意思是进入我的android studio目录的sdk文件夹).
我做了什么?
我以管理员(right click > open as administrator
)的身份打开了Android Studio .然后我去Configure > Projects Defaults > Project Structure
.我只有一个SDK(路径是C:\Program Files\Java\jdk1.7.0_25
).我没有设置我的SDK,然后我点击添加,我找到我的sdk(sdk文件夹,进入android studio目录).
确定...结果:所选目录不是JDK的有效主页.
我能做什么?
我正在尝试使用Grammar-Kit插件为IntelliJ开发自定义语言插件.我很容易为定义的标记提供语法高亮,但我无法弄清楚如何在元素或标记 - 父级别突出显示.
这是一个快速而又脏的示例语言 - https://github.com/carymrobbins/intellij-plugin-example
解
正如@ignatov建议的那样,扩展Annotator类并在你的注册表中注册它plugin.xml
.在下面的示例中,我们command
通过定义visitCommand
方法来突出显示元素.
public class SimpleAnnotator implements Annotator {
@Override
public void annotate(@NotNull final PsiElement element, @NotNull final AnnotationHolder holder) {
element.accept(new SimpleVisitor() {
@Override
public void visitCommand(@NotNull SimpleCommand o) {
super.visitCommand(o);
setHighlighting(o, holder, SimpleSyntaxHighlighter.COMMAND);
}
});
}
private static void setHighlighting(@NotNull PsiElement element, @NotNull AnnotationHolder holder,
@NotNull TextAttributesKey key) {
holder.createInfoAnnotation(element, null).setEnforcedTextAttributes(TextAttributes.ERASE_MARKER);
holder.createInfoAnnotation(element, null).setEnforcedTextAttributes(
EditorColorsManager.getInstance().getGlobalScheme().getAttributes(key));
}
}
Run Code Online (Sandbox Code Playgroud) 为什么我的查询不能处理集合中超过100个文档?
db.collection('allowedmacs').find().toArray(function(err, docs) {
console.log(docs);
}
Run Code Online (Sandbox Code Playgroud)
错误地说:
name: 'MongoError',
message: 'connection destroyed, not possible to instantiate cursor'
Run Code Online (Sandbox Code Playgroud)
如果文件<100,一切正常.
在Orgmode中,有没有办法纠缠子树中匹配(或不匹配)特定标签的块?
例如,使用以下代码
* A
#+BEGIN_SRC c
printf("Not exported");
#+END_SRC
* B :D:
#+BEGIN_SRC c
printf("Exported");
#+END_SRC
Run Code Online (Sandbox Code Playgroud)
沿着标签D导出,纠缠C文件将只包含printf("Exported");
我org-mode
用来组织我的emacs配置,我的目标是从主设备中获得不同的配置emacs-config.org
.(例如通过仅标记特定的lightconfig)
我正在构建一个gradle Exec
任务,意味着只需调用一个基本sed
命令,让我们说: sed -i 's:some:substitution:' *
什么是正确的语法或gradle函数/变量,以使*
glob在一些bash/zsh shell中匹配的文件替换?
换句话说,如何触发shell扩展?
到目前为止我尝试的是:
task myTask(type: Exec){
workingDirsome dir
commandLine 'sed', '-i', 's:some:substitution:', "*"
}
Run Code Online (Sandbox Code Playgroud)
但是我得到一个错误:sed: can't read *: No such file or directory
这并不令人惊讶.
我找不到最新mrunit(1.1.0)
的Cloudera存储库.可用的是0.8.0-incubating
.以下是我的pom
:
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.ma.hadoop</groupId>
<artifactId>MapReduce</artifactId>
<version>0.0.1-SNAPSHOT</version>
<properties>
<hadoop.version>2.3.0-cdh5.1.2</hadoop.version>
<hive.version>0.12.0-cdh5.1.2</hive.version>
<mrunit.version>0.8.0-incubating</mrunit.version>
</properties>
<dependencies>
<!-- For unit testing -->
<dependency>
<groupId>org.apache.mrunit</groupId>
<artifactId>mrunit</artifactId>
<version>${mrunit.version}</version>
</dependency>
<!-- This is sufficient for all -->
<dependency>
<groupId>org.apache.hadoop</groupId>
<artifactId>hadoop-client</artifactId>
<version>${hadoop.version}</version>
</dependency>
</dependencies>
<build>
<finalName>Mapred</finalName>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>1.2.1</version>
</plugin>
</plugins>
</pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.1</version>
<configuration>
<source>${jdk.version}</source>
<target>${jdk.version}</target>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>2.4</version>
<configuration>
<outputDirectory>${basedir}</outputDirectory>
</configuration>
</plugin>
</plugins>
</build>
<repositories>
<repository> …
Run Code Online (Sandbox Code Playgroud) 是否有任何类型的AWS CodeBuild环境变量可以帮助标记构建工件的版本信息?.即Bamboo所具有的等价物bamboo_buildNumber
.理想情况下,我想要内置编号和SCM编号.
文档讨论CODEBUILD_x
了内部使用的变量,但我无法找到它们的列表.
actionview ×1
android ×1
autocomplete ×1
bash ×1
bnf ×1
cloudera-cdh ×1
emacs ×1
glob ×1
gradle ×1
grammar-kit ×1
java-8 ×1
javascript ×1
jflex ×1
macos ×1
mapreduce ×1
mongodb ×1
mrunit ×1
node.js ×1
org-babel ×1
org-mode ×1
rendering ×1
repository ×1
ruby ×1
zsh ×1