Questions tagged [load-path]
63 questions
5
votes
1 answer
How can I configure gem to only ever use system gems?
I want to configure gem to only use system gems - never those in $HOME/.gem. This is because I'm writing a script that will access Gem.path and I don't want it to return the path to gems in my home directory.
I'm pretty sure I haven't explicitly set…

nfm
- 19,689
- 15
- 60
- 90
4
votes
4 answers
Can I determine which paths RubyGems added to the load path to make my command line app work?
In a gemspec, I can specify the require_paths, which represent paths I want to be able to require from at runtime. These get put into the $LOAD_PATH by RubyGems.
My question is: is there a way I can determine what these paths are at runtime? Can I…

davetron5000
- 24,123
- 11
- 70
- 98
4
votes
1 answer
julia not finding "standard" packages (or LOAD_PATH)?
Upgraded [from 1.5.3] to Julia 1.6.3 on Ubuntu 20.04 [Windwos 10 WSL2] info: building from julia github repo and not via apt
My local clone resides on the Windows filesystem and I navigated there with bash shell to start the build process from…

GWD
- 1,387
- 10
- 22
4
votes
1 answer
Is there a way to use Gems in Vim's 'embedded' Ruby?
I'm trying to use the tinder gem from inside Vim. I'd like to be able to write to the Vim buffers, so I need to use Vim's embedded Ruby using :ruby as opposed to externally calling !ruby.
I have run gem install tinder with no problems on the command…

Chris
- 1,501
- 17
- 32
3
votes
3 answers
In the Ruby programming language, what is the name of $:
I want to know more about $: but I don't how is called.
:015 > $:
=> ["/Users/Nerian/.rvm/rubies/ruby-1.9.3-rc1/lib/ruby/site_ruby/1.9.1",
"/Users/Nerian/.rvm/rubies/ruby-1.9.3-rc1/lib/ruby/site_ruby/1.9.1/x86_64-darwin11.1.0",
…

Nerian
- 15,901
- 13
- 66
- 96
3
votes
1 answer
Julia: JULIA_LOAD_PATH not defined when trying to set value
I am trying to set the JULIA_LOAD_PATH as already discussed here Github issue and Julia Docu.
I try to run
JULIA_LOAD_PATH= "/mypath/bla:$JULIA_LOAD_PATH"
in a julia-session, but get the following error:
UndefVarError: JULIA_LOAD_PATH not…

cpernul
- 137
- 5
3
votes
1 answer
How are $LOAD_PATH and $: different?
I needed to know what was in my Ruby load path, so I did this:
$ ruby -e "puts $LOAD_PATH"
It didn't print anything out, which I didn't expect. So I tried this:
$ ruby -e "puts…

Benjamin Oakes
- 12,262
- 12
- 65
- 83
2
votes
2 answers
Error running rake task from IDE
I am having a problem running the 'test' Rake task from IntelliJ Idea in Ruby On Rails application:
Error running test: File 'test/unit/autorunner.rb' wasnt found in $LOAD_PATH of Ruby SDK with interpreter: '{1}'
But the file is located at…

Bogdan Gusiev
- 8,027
- 16
- 61
- 81
2
votes
1 answer
How to mask an already installed Emacs package?
I am using Emacs 24 in an work environment where I cannot modify what are outside of my personal folder.
I want to install a particular package, but there is already an older version of this package installed outside of my personal folder. I have to…

lebesgue
- 837
- 4
- 13
2
votes
2 answers
how to distribute a ruby script via homebrew
How can I deploy a simple ruby script via homebrew?
Here's what I tried
Wrote formula in a GitHub repo named homebrew-foo
# file https://github.com/foo/homebrew-foo/blob/master/foo.rb
class Foo < Formula
desc "A command line tool"
url…

american-ninja-warrior
- 7,397
- 11
- 46
- 80
2
votes
1 answer
How do I use a module defined in lib/ folder of Phoenix project?
I've created a Module inside the lib/, more specifically lib/my_namespace/test_module.exs.
This is all that is defined within it:
defmodule MyNamespace.TestModule do
def test do
"This is a test"
end
end
Calling the test() function of this…

John
- 9,254
- 12
- 54
- 75
2
votes
1 answer
How to configure RSpec to find specs in lib folder?
I am creating a little API with Rails 5.0 following this tutorial http://apionrails.icalialabs.com/book/frontmatter
I am trying to run a test located in app/config/lib but RSpec won't find the test.
I have tried adding config.autoload_paths <<…

Emilio Menéndez
- 1,932
- 2
- 11
- 20
2
votes
1 answer
How does the emacs load the package?
I'm always curious about the loading process of the package in Emacs. You know, Some packages are builtin packages, and some are third-party packages.
For example, you can install the "auto-complete" package from MELPA or MELPA-STABLE, or you can…

董泽锋
- 105
- 9
2
votes
2 answers
Why load "file.rb" works even though "." is not in the load path?
I have created a project in /Projects/test that have the following files:
/Projects/test/first.rb
/Projects/test/second.rb
In first.rb, I do:
load 'second.rb'
And it gets loaded correctly. However, if I open the console and I type $:, I don't see…

Hommer Smith
- 26,772
- 56
- 167
- 296
2
votes
1 answer
Ocra and scripts marked as executable in Rubygems gemspec
I have created a gem that exposes an executable that works under Linux. In Windows, if I navigate to the directory where the gem is installed I can run it from the command line, but I have to specify -Ilib myself when invoking ruby.
I want use Ocra…

iftheshoefritz
- 5,829
- 2
- 34
- 41