简体   繁体   English

运行独立的 Rails 脚本

[英]Running stand-alone Rails script

I'm submitting a bug report to jsonapi-resources .我正在向jsonapi-resources提交错误报告。 Their issue template asks that I create a MCVE using their template .他们的问题模板要求我使用他们的模板创建 MCVE。 This looks like a self-contained script for a rails-based project.这看起来像是基于 rails 的项目的自包含脚本。 I've only ever run similar code as an actual rails project with separate files and using rails server .我只运行过与具有单独文件并使用rails server的实际 rails 项目类似的代码。 My question is, how do I run this self-contained script?我的问题是,如何运行这个独立的脚本?

I ran it with我跑了

ruby <filename>

It seems to programmatically install gems.它似乎以编程方式安装宝石。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 独立的ruby脚本中的Ruby gem - Ruby gems in stand-alone ruby scripts 独立的Rails服务器可以接受多个IP地址上的请求 - Can stand-alone Rails server accept requests on multiple IP addresses 如何将 emojioneArea(独立)select 值添加到文本字段? JQuery 导轨 6.0.0 - How to add emojioneArea (stand-alone) select value to text field? JQuery Rails 6.0.0 如何为我独立的Ruby脚本设置Rails环境? - How can I set the Rails environment for my somewhat stand alone Ruby script? 无法使用黄瓜step_definition定位元素,但能够通过水豚独立定位 - Unable to locate element with cucumber step_definition, but able to locate it with capybara stand-alone 无法为生产服务器上的websocket-rails启动独立服务器 - Unable to start stand alone server for websocket-rails on production server 如何编写像before_filter和after_filter这样的rails,用于独立的ruby程序 - How to write rails like before_filter and after_filter for a stand alone ruby program 独立配置乘客3.0.2中的nginx - configure nginx in passenger 3.0.2 stand alone 使用活动记录独立访问数据库 - Acessing a database stand alone using active record 单独乘客使用错误的红宝石版本? - Passenger stand alone uses wrong ruby version?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM