load-path Questions
9
Solved
I have seen two commonly used techniques for adding the directory of the file currently being executed to the $LOAD_PATH (or $:). I see the advantages of doing this in case you're not working with ...
5
Solved
I currently have the following 4 files in my config/locales of my root application:
-en.yml
-de.yml
-simple_form.en.yml
-simple_form.de.yml
In my application.rb which resides in a spec/dummy fol...
Hogue asked 24/5, 2012 at 10:41
5
Solved
Been playing with Ruby on Rails for awhile and decided to take a look through the actual source. Grabbed the repo from GitHub and started looking around. Came across some code that I am not sure wh...
Syncretism asked 13/12, 2009 at 15:53
2
Solved
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 ...
1
Problem:
I'm using gulp-sass and would like to define a load_path so that I don't have to have really long @import rules voor bower dependencies e.g.
@import "normalize"
instead of
@import ".....
3
Solved
Whenever I see some installation instruction for an emacs package it always suggests to use add-to-list 'load-path it never works for me. For some reason and I have to use load-file. For example, t...
7
Solved
The latest changesets to Ruby 1.9.2 no longer make the current directory . part of your LOAD_PATH. I have a non-trivial number of Rakefiles that assume that . is part of the LOAD_PATH, so this brok...
2
Solved
0
I was upgrading to Rails 3.2.6 (ruby 1.9.3-p194) and installing RVM on Debian and using Apache2 server (2.2.19).
I used these very nice instructions: http://dalibornasevic.com/posts/21-rvm-and-pass...
Rookie asked 10/7, 2012 at 13:3
2
Solved
Assuming I compile my own fresh Ruby (MRI 1.9.3), what is the default LOAD_PATH, and how is that computed?
2
Solved
I understand that to add a path to $LOAD_PATH just do
$LOAD_PATH.unshift(path)
But I have to add this line to every program I wrote. Is there anyway to add it to the system level?
I tried to se...
3
Solved
Usually be seen in .gemspec file. eg. i18n.gemspec.
$: << File.expand_path('../lib', __FILE__)
3
Solved
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/rub...
4
Note that I am not using Rails. I have a directory structure like:
foo/
bar/
base_classes/
base_classes.rb
base_classes.rb:
Dir.glob(File.expand_path(File.join("base_classes/config/constants",...
2
I pack some ruby code into a gem. I want to refer the code in the gem in some other code.
So in the Gemfile I specify the gem's name, version, and local path. Like:
gem 'gemname','0.x', :path =>...
2
Solved
I want to write a gem that adds a app/services directory to a Rails application.
Since I want to add it from within the Gem i came up with this solution:
class Railtie < ::Rails::Railtie
conf...
Scent asked 8/6, 2011 at 13:19
1
Solved
I've been trying to get a ruby file to require another ruby file and I feel like I'm going crazy. My setup is as follows
Two files in '/raid1/ruby-code/benchmark/'
CommandRunner
Benchmarker
Be...
1
© 2022 - 2024 — McMap. All rights reserved.