创建ruby/bin/rails文件的代码模式在哪里

编程入门 行业动态 更新时间:2024-10-27 10:28:14
本文介绍了创建ruby/bin/rails文件的代码模式在哪里的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

今天,我以系统执行rails命令的方式进行工作.并发现了这条链子

Today I worked with the way a system executes rails command. And discovered this chain

ruby_instalation_dir/bin/rails-> ruby​​/gems/reilaties/exe/rails -> ruby​​/gems/reilaties /lib/rails/cli.rb

我可以在GitHub上找到该链的最后两个元素.

Last two elements of this chain I able to find in the GitHub.

现在我正在寻找什么指令,这些指令告诉RubyGem如何生成rails文件.我在 rails.gemspec 文件.但是RubyGem如何知道需要调用railaties gem.此信息存储在哪里?

Now I'm seeking what is the instructions that tell RubyGem how to generate rails file. I did not find any match of railaties in the rails.gemspec file. But some how RubyGem knows that need to call railaties gem. Where does this information stored?

推荐答案

rails命令是 railties 宝石的一部分,而不是 rails 宝石的一部分.因此,您需要查看 railties gemspec :

The rails command is part of the railties gem, not part of the rails gem. Therefore, you need to look in the railties gemspec:

s.bindir = "exe" s.executables = ["rails"]

更多推荐

创建ruby/bin/rails文件的代码模式在哪里

本文发布于:2023-10-08 14:01:06,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1472841.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:模式   代码   文件   ruby   bin

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!