Code Monkey home page Code Monkey logo

Comments (4)

noniq avatar noniq commented on August 15, 2024

Good catch and thorough examination, thanks!

Seems like we have to stick to Ruby 1.8 for Commands run from TextMate (see http://lists.macromates.com/textmate-dev/2014-August/014993.html – note that the ruby20 has not yet been implemented, as far as I can tell).

A backward compatible replacement for require_relative would be require File.dirname(__FILE__) + "/foo.rb", I think.

Ccing @infininight.

from rspec.tmbundle.

smartygus avatar smartygus commented on August 15, 2024

Yeah, I saw that TextMate wasn't ready for Ruby2.0 yet as well, which is a bit of a bummer, but what can you do...

I actually tried a few different options, and I couldn't get any of them to work. Not sure if it's something to do with my setup though. Here's what I tried:-

require File.expand_path(File.dirname(__FILE__) + '/helpers')
# or
require File.expand_path(File.dirname(__FILE__) + '/helpers.rb')
# or
require File.dirname(__FILE__) + "/helpers"
# or
require File.dirname(__FILE__) + "/helpers.rb"
# or
$LOAD_PATH << File.dirname(__FILE__) # followed by...
require 'helpers'

from rspec.tmbundle.

noniq avatar noniq commented on August 15, 2024

All of these should have worked, I think. But you also need to add include Helpers to make the method available. 😄

from rspec.tmbundle.

smartygus avatar smartygus commented on August 15, 2024

Oh haha, of course!
Kinda doesn't work without being included 😅
Thanks

from rspec.tmbundle.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.