Top "Require" questions

In interpreted languages like Lua, PHP and Ruby, "require" is a statement that tells the interpreter to include a certain source-file at that position where the "require" statement has been placed.

Why doesn't relative_require work on Ruby 1.8.6?

I'm learning Ruby (using version 1.8.6) on Windows 7. When I try to run the stock_stats.rb program below, I get …

ruby require
ruby require_relative gives LoadError: cannot infer basepath inside IRB

I am currently in Dropbox/96_2013/work/ror/dmc/dmStaffing/QA/selenium_server_wyatt/spec/2day/units/ I can go into …

ruby require
PDFMAKE: 'Roboto-Regular.ttf' not found in virtual file system ONLY AFTER GULP

I created a simple app using knockout/bootstrap/gulp that downloads a pdf using pdfMake.js. It works fine in …

javascript knockout.js gulp require pdfmake
how to require active record working outside of rails

i need to require active record, but I am working outside of rails (here is why: Simple Ruby Input Validation …

ruby-on-rails ruby activerecord rubygems require
require lib in RSpec with Ruby 1.9.2 brings "no such file to load"

I am trying to upgrade one of my Rails projects to Ruby 1.9.2. All went pretty well, but one RSpec test …

ruby-on-rails ruby rspec require ruby-1.9
PHPStorm: undefined variables caused by include/require

PHPStorm showed that all the variables from other files, both required and included, are undefined. I found this solution here, …

php variables undefined require phpstorm
How to exclude certain requireJS files from uglifying/optimizing

I have a working requirejs project that is using grunt for building and deployment. If using no optimization at all, …

requirejs require gruntjs uglifyjs uglifyjs2
Is require File.expand_path(..., __FILE__) the best practice?

Is require File.expand_path(..., __FILE__) the best way to require other files within a project?

ruby require
Neither ruby and nor irb can load .rb file in current directory

I'm having a really noob problem with importing files in Ruby. I'm making a Ruby app in Windows XP. All …

ruby import require irb ruby-1.9.2
Ruby require "no such file to load" error yet clearly in path

I've been trying to get a ruby file to require another ruby file and I feel like I'm going crazy. …

ruby scripting require load-path