I'm playing a little bit around with shoes.
Their i have a problem with require. When i want to require a file witch
is in the same Directory like the Shoes.app File i get a "no such file
to load error". Is it not possible to require files?
shoesTest.rb:
require "shoesTestb"
Shoes.app do
$app = self
para "lalala"
para lala
end
From: list-bounce@example.com
[mailto:list-bounce@example.com] On Behalf Of Asdf Fsda
Sent: Wednesday, April 23, 2008 9:00 AM
To: ruby-talk ML
Subject: Shoes and require
Helo
I'm playing a little bit around with shoes.
Their i have a problem with require. When i want to require a
file witch
is in the same Directory like the Shoes.app File i get a "no such file
to load error". Is it not possible to require files?
shoesTest.rb:
require "shoesTestb"
Shoes.app do
$app = self
para "lalala"
para lala
end
shoesTestb.rb:
def lala
'lalafunction'
end
Apparently, your current directory is not the same as where your files are and you are invoking your application by path. If so, you need to do the following before 'require':
Apparently, your current directory is not the same as where your files
are and you are invoking your application by path. If so, you need to
do the following before 'require':
On Thu, Apr 24, 2008 at 01:09:44AM +0900, Gennady Bystritsky wrote:
On Thu, Apr 24, 2008 at 12:59:37AM +0900, Asdf Fsda wrote:
> is in the same Directory like the Shoes.app File i get a "no such file
> to load error". Is it not possible to require files?
The require method doesn't take a filename as a parameter; it takes a
"feature name". Changing my thinking to this paradigm has saved me from
being frustrated with Ruby for not working the way I expect.
Apparently, your current directory is not the same as where your files
are and you are invoking your application by path. If so, you need to
do the following before 'require':
$: << File.dirname(__FILE__)
__FILE__ #=> (eval)
So that doesent work
If you're using 1.9, then:
Shoes is using 1.8.6
···
On Thu, Apr 24, 2008 at 01:09:44AM +0900, Gennady Bystritsky wrote:
On Thu, Apr 24, 2008 at 12:59:37AM +0900, Asdf Fsda wrote:
> is in the same Directory like the Shoes.app File i get a "no such file
> to load error". Is it not possible to require files?
The require method doesn't take a filename as a parameter; it takes a
"feature name". Changing my thinking to this paradigm has saved me from
being frustrated with Ruby for not working the way I expect.
My problem is that Shoes is not working the way I expect
On Thu, Apr 24, 2008 at 05:24:36PM +0900, Asdf Fsda wrote:
Paul Brannan wrote:
> On Thu, Apr 24, 2008 at 01:09:44AM +0900, Gennady Bystritsky wrote:
>> Apparently, your current directory is not the same as where your files
>> are and you are invoking your application by path. If so, you need to
>> do the following before 'require':
>>
>> $: << File.dirname(__FILE__)
Paul Brannan wrote:
>> Apparently, your current directory is not the same as where your files
>> are and you are invoking your application by path. If so, you need to
>> do the following before 'require':
>>
>> $: << File.dirname(__FILE__)
__FILE__ #=> (eval)
So that doesent work
Try the more recent 0.r532 builds. Not only should require work,
but $0 and __FILE__ should be set right.
Thank you for the Tipp
I downloaded shoes-0.r532-intel.dmg tried to start it on OS X 10.5.2 on
an MacBook.
I get this Error: LSOpenFromURLSpec() failed with error -10810 for the
file /Users/fabian.
What can this be?
Fabian
···
On Thu, Apr 24, 2008 at 05:24:36PM +0900, Asdf Fsda wrote:
> On Thu, Apr 24, 2008 at 01:09:44AM +0900, Gennady Bystritsky wrote: