开发者

Load application in console and use its environment

开发者 https://www.devze.com 2023-04-06 08:17 出处:网络
I try to write a little ruby script, which shall load a ruby application with the command load. That works fine.

I try to write a little ruby script, which shall load a ruby application with the command load. That works fine.

But I want to use the loaded environment to run commands, but I don't know how to get it working.

It looks like:

load('script/开发者_JAVA百科console')
LoadedClass.find(1)

Is it possible?


You could write your script and then use the rails runner to run it.

0

精彩评论

暂无评论...
验证码 换一张
取 消