SapphireSteel Forum
Welcome, Guest. Please login or register.
May 19, 2013, 06:01:38 PM

Login with username, password and session length
Search:     Advanced search
Welcome to the SapphireSteel forum - for discussion of the Ruby In Steel and Amethyst IDEs
3883 Posts in 799 Topics by 669 Members
Latest Member: m
* Home Help Search Login Register
+  SapphireSteel Forum
|-+  General
| |-+  Ruby In Steel
| | |-+  Problems with Require
« previous next »
Pages: [1] Print
Author Topic: Problems with Require  (Read 2947 times)
seabird20
Newbie
*
Posts: 4


« on: March 18, 2009, 04:12:12 PM »

All, I have recently downloaded Ruby In Steel - looks like v1.4. I am running inside VisualStudio 2005 Pro.

There are a couple of weirdnesses in the testing area (and possibly elsewhere too, but this is where I have seen them).

The require statements inside test_helper.rb are:

require File.expand_path(File.dirname(__FILE__) + "/../config/environment")
require 'test_help'

The first one complains that require has to take a litreral constant
The second one complains that it can't "require test_help at line 3"

Two questions:

Is this serious? If so, any ideas what to do about it?

Thanks

Chris
Logged
Dermot
Administrator
Hero Member
*****
Posts: 1005


« Reply #1 on: March 19, 2009, 04:02:55 AM »

No, it's not serious.

The IntelliSense system needs to know about required files because they contain code which may be useful. However, IS only processes require files that it can open.

So things like

require 'x.rb'

are easy to deal with and work fine. Anything else causes trouble.

The second one should be openable by IS, so there's something  wrong in the paths that it searches. The search paths are typically the current directory (and sub directories) and most of the Ruby file directories, so it looks like 'test_help' isn't in one of the search paths.

But the warning messages are only that - warnings that IS can't find them.

Dermot

Logged
seabird20
Newbie
*
Posts: 4


« Reply #2 on: March 20, 2009, 06:38:06 AM »

Thanks. That was only an example, there are other places, so somehow I must have the paths messed up. Any hints on knowing how to discover what the path is (presumably the appropriate system variable, but I can't remember which one and I don't have pickaxe handy!) and then second if there is something missing how to get it included.

Thanks

C
Logged
Dermot
Administrator
Hero Member
*****
Posts: 1005


« Reply #3 on: March 30, 2009, 03:50:55 PM »

It's

$:

There isn't a simple way to get the paths used in parsing, unfortunately.

Dermot
Logged
flayer
Newbie
*
Posts: 3


« Reply #4 on: April 17, 2009, 02:38:33 AM »

I had a problem with require in which the target file was sited in the same directory as the source file but the target file contained the following line:

alias ar_unformatted_block= :unformatted_block=

RiS seems unable to parse ":unformatted_block=", indicating this with a red squiggle under the "=" and the associated tool tip text message "unexpected token: '='".
Logged
Dermot
Administrator
Hero Member
*****
Posts: 1005


« Reply #5 on: April 17, 2009, 06:47:45 AM »

That looks like problem with the parser. I've added a bug to our tracking system.

Dermot
Logged
Pages: [1] Print 
« previous next »
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.11 | SMF © 2006-2009, Simple Machines LLC Valid XHTML 1.0! Valid CSS!