因此,我正在制作一个Ruby Shoes应用程序,希望能够在其中打开一个带有GIMP的文件。到目前为止,我已经尝试过在ruby中运行gimp,它所做的就是返回命令行消息:
gimp
/Applications/GIMP.app/Contents/MacOS
/Applications/GIMP.app/Contents/MacOS/:/Applications/GIMP.app/Contents/Resources/bin:/Users/a/.rvm/gems/ruby-2.0.0-p247/bin:/Users/a/.rvm/gems/ruby-2.0.0-p247@global/bin:/Users/a/.rvm/rubies/ruby-2.0.0-p247/bin:/Users/a/.rvm/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/Users/a/.rvm/bin:/Applications/GIMP.app/Contents/MacOS尝试在ruby中打开一个使用open -a GIMP somefile.jpg的应用程序时,会出现一个错误窗口,显示GIMP cannot be opened because of a problem.
编辑:好的,我和我的一个朋友在这里,我们一起工作,我们发现了一些让我像绿巨人一样生气的东西。我做了一个小程序,仍然有相同的错误。
Shoes.app width: 640, height: 756, title: 'Eine' do
para `source ~/.bashrc; GIMP PRfyS.jpg`
end这有什么可笑的?我可以进入我的终端,输入ruby -e " Shoes.app width: 640, height: 756, title: 'Eine' do para source ~/.bashrc; GIMP PRfyS.jpg end,它就可以工作了。(对于stackoverflow格式,将删除反引号)
发布于 2014-03-21 02:29:07
我不太清楚你到底想做什么。如果你只是想要一个按钮来启动GIMP,那么我可以这样做
Shoes.app do
button "open gimp" do
spawn 'gimp PRfyS.jpg'
end
endhttps://stackoverflow.com/questions/19454249
复制相似问题