如何制作可插拔的 Rails 应用程序

发布于 2024-09-26 06:14:00 字数 281 浏览 0 评论 0原文

基本上,我想编写一个

  • 可嵌入其他 Rails 3 应用程序(基本上是一些路线、控制器和一些视图,没有持久模型)的
  • Rails 3 应用程序,可以独立工作
  • ,可以捆绑到 gem 中并从命令启动(这个更值得拥有)

根据我所读到的,轨道引擎将完全解决我的问题。当你用谷歌搜索时,你得到的绝大多数内容要么是人们抱怨缺乏文档,要么是有人构建了一个插件,而不是真正的可插入应用程序。谁能给我指出更好的文档/截屏视频(如果需要的话甚至是书籍)

非常感谢

Basically, I would like to write a rails 3 app that

  • is embeddable in other rails 3 apps (basically some routes, a controller, and some views, no persisting models)
  • works standalone
  • can be bundled up into a gem and be launched from a command (this one is more a nice to have)

From what I have read, rails engines would totally solve my problem. The vast majority of what you get when you google it is either people complaining about a lack of documentation, or someone building a plugin, not really a pluggable app. Could anyone point me to better documentation/screencasts (even books if nessicary)

Thanks a bunch

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

梦忆晨望 2024-10-03 06:14:00

马特,我正在开发一个 Rails 论坛引擎,我必须解决很多问题,因此我将基础知识提取到一个涵盖许多常见需求的详细示例中。它是通用的,因此您可以轻松地适应它。我还没有详细的文档,但我链接到我用来解决这个问题的来源,并且我很乐意回答有关我的来源的问题。看看:

http://keithschacht.com/creating-a- Rails-3-engine-plugin-gem/

Matt, I'm working on a rails forum engine and I had to figure a lot of this out so I extracted the foundation into a detailed example that covers a lot of common needs. It's generalized so you can easily adapt it. I don't have detailed documentation yet but I link to the sources that I used to figure this out, and I'm happy to answer questions about my source. Check it out:

http://keithschacht.com/creating-a-rails-3-engine-plugin-gem/

嘿咻 2024-10-03 06:14:00

引擎确实是您所需要的,并且完全是为了满足您的要求而设计的。

实际上,Rails3 中的引擎工作得更好。

Rails 以前版本中的很多抱怨都在最新版本中得到了解决。我在 Rails 2.x 中广泛使用了引擎,说实话并没有发现它们有那么糟糕。

An Engine is really what you need and totally designed to meet your reuirements.

Engines actually work a lot better in Rails3.

A lot of the complaints from previous versions of Rails have been resolved in the latest version. I have used engines quite extensively in Rails 2.x and not found them to be all that bad to be honest.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文