Skip to content

Tarik Billa

  • Web Development
    • html
    • vue.js
    • laravel
    • css
    • javascript
    • jquery
    • node.js
    • php
    • asp.net
  • Programming
    • python
    • java
    • c
    • c++
    • c#
  • git
  • android

load-path

What does the “$” character mean in Ruby?

March 20, 2023 by Tarik

$ identifies a global variable, as opposed to a local variable, @instance variable, or @@class variable. Among the language-supplied global variables are $:, which is also identified by $LOAD_PATH

Categories ruby-on-rails Tags dollar-sign, global-variables, load-path, ruby, ruby-on-rails Leave a comment

Adding a directory to $LOAD_PATH (Ruby)

January 5, 2023 by Tarik

The Ruby load path is very commonly seen written as $: , but just because it is short, does not make it better. If you prefer clarity to cleverness, or if brevity for its own sake makes you itchy, you needn’t do it just because everyone else is. Say hello to … $LOAD_PATH … and … Read more

Categories ruby Tags load-path, ruby, rubygems Leave a comment

Why does Ruby 1.9.2 remove “.” from LOAD_PATH, and what’s the alternative?

November 18, 2022 by Tarik

It was deemed a “security” risk. You can get around it by using absolute paths File.expand_path(__FILE__) et al or doing require ‘./filename’ (ironically). or by using require_relative ‘filename’ or adding an “include” directory ruby -I . … or the same, using irb; $irb -I .

Categories ruby Tags load-path, rake, require, ruby Leave a comment

Tarik Billa

Software Engineer
tarikbilla@gmail.com
+8801884414000
  • Reuse a hash in YAMLApril 17, 2024
  • Dockerfile: how to redirect the output of a RUN command to a variable?April 16, 2024
  • How to cd to a directory with spaces in the directory name?April 16, 2024
  • Maximum MIME type length when storing the type in a databaseApril 16, 2024
  • What is the difference between Unit, Integration, Regression and Acceptance Testing?April 16, 2024
© 2026 Tarik Billa