havenwood changed the topic of #ruby to: Rules & more: https://ruby-community.com | Ruby 2.6.3, 2.5.5, 2.7.0-preview1: https://www.ruby-lang.org | Paste 4+ lines of text to https://dpaste.de/ and select Ruby as the language | Rails questions? Ask in #RubyOnRails | Books: https://goo.gl/wpGhoQ | Logs: https://irclog.whitequark.org/ruby | Can't talk? Register/identify with Nickserv first!
skryking has quit [Ping timeout: 246 seconds]
kyrylo has joined #ruby
skryking has joined #ruby
kyrylo has quit [Read error: Connection reset by peer]
Fernando-Basso has quit [Remote host closed the connection]
SeepingN has joined #ruby
SeepingN has quit [Remote host closed the connection]
kyrylo has joined #ruby
kyrylo has quit [Read error: Connection reset by peer]
brool has joined #ruby
Sithembewena has joined #ruby
orbyt_ has joined #ruby
kyrylo has joined #ruby
kyrylo has quit [Read error: Connection reset by peer]
morenoh149 has quit [Quit: WeeChat 2.3]
kyrylo has joined #ruby
kyrylo has quit [Read error: Connection reset by peer]
SeepingN has joined #ruby
tpanarch1st has quit [Ping timeout: 272 seconds]
poontangmessiah has quit [Remote host closed the connection]
AJA4350 has quit [Ping timeout: 258 seconds]
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
kyrylo has joined #ruby
kyrylo has quit [Read error: Connection reset by peer]
orbyt_ has joined #ruby
jenrzzz_ has joined #ruby
eddof13 has quit [Quit: eddof13]
kyrylo has joined #ruby
jenrzzz has quit [Ping timeout: 272 seconds]
kyrylo has quit [Read error: Connection reset by peer]
jenrzzz_ has quit [Ping timeout: 268 seconds]
kyrylo has joined #ruby
kyrylo has quit [Read error: Connection reset by peer]
jenrzzz has joined #ruby
AJA4350 has joined #ruby
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
SCHAPiE has quit [Ping timeout: 258 seconds]
codefriar has quit [Quit: Textual IRC Client: www.textualapp.com]
codefriar has joined #ruby
codefriar has quit [Client Quit]
codefriar has joined #ruby
SCHAPiE has joined #ruby
jenrzzz has quit [Ping timeout: 244 seconds]
wildtrees has quit [Quit: Leaving]
orbyt_ has joined #ruby
sylario has quit [Quit: Connection closed for inactivity]
shirak has joined #ruby
ellcs has joined #ruby
wallace_mu has joined #ruby
kyrylo has joined #ruby
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
kyrylo has quit [Read error: Connection reset by peer]
jakeb2 has joined #ruby
hyuke has joined #ruby
kyrylo has joined #ruby
orbyt_ has joined #ruby
kyrylo has quit [Read error: Connection reset by peer]
ellcs has quit [Ping timeout: 264 seconds]
orbyt_ has quit [Ping timeout: 245 seconds]
kyrylo has joined #ruby
kyrylo has quit [Read error: Connection reset by peer]
mat_bug has quit [Remote host closed the connection]
ur5us has joined #ruby
kyrylo has joined #ruby
Sithembewena has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
kyrylo has quit [Read error: Connection reset by peer]
ur5us has quit [Read error: Connection reset by peer]
orbyt_ has joined #ruby
ur5us has joined #ruby
orbyt_ has quit [Client Quit]
cthulchu has quit [Ping timeout: 258 seconds]
Sithembewena has joined #ruby
kyrylo has joined #ruby
kyrylo has quit [Read error: Connection reset by peer]
kyrylo has joined #ruby
Sithembewena has quit [Quit: Textual IRC Client: www.textualapp.com]
SeepingN has quit [Quit: The system is going down for reboot NOW!]
t-richards has joined #ruby
jenrzzz has joined #ruby
jottr__ has joined #ruby
jenrzzz has quit [Ping timeout: 248 seconds]
jottr__ has quit [Ping timeout: 268 seconds]
t-richards has quit [Quit: Leaving]
AJA4350 has quit [Ping timeout: 245 seconds]
ramfjord has quit [Ping timeout: 246 seconds]
ramfjord has joined #ruby
ramfjord has quit [Ping timeout: 245 seconds]
kyrylo has quit [Read error: Connection reset by peer]
kyrylo has joined #ruby
jenrzzz has joined #ruby
jottr__ has joined #ruby
_falsebay_ has joined #ruby
jottr__ has quit [Ping timeout: 248 seconds]
shirak_ has joined #ruby
shirak has quit [Ping timeout: 245 seconds]
duderonomy has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
cthulchu_ has joined #ruby
jenrzzz has quit [Read error: Connection reset by peer]
jenrzzz has joined #ruby
cthulchu_ has quit [Ping timeout: 246 seconds]
ur5us has quit [Remote host closed the connection]
ur5us has joined #ruby
ur5us has quit [Ping timeout: 245 seconds]
shirak_ has quit [Ping timeout: 245 seconds]
bmurt has joined #ruby
kyrylo has quit [Read error: Connection reset by peer]
kyrylo has joined #ruby
kyrylo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
brool has quit [Ping timeout: 250 seconds]
wallace_mu has quit [Remote host closed the connection]
gix- has joined #ruby
gix has quit [Disconnected by services]
orbyt_ has joined #ruby
codefriar has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
bambanx has quit [Quit: Leaving]
ramfjord has joined #ruby
ramfjord has quit [Ping timeout: 268 seconds]
jottr__ has joined #ruby
code_zombie has quit [Quit: Leaving]
jottr__ has quit [Ping timeout: 244 seconds]
code_zombie has joined #ruby
bhaak has quit [Ping timeout: 244 seconds]
Swyper has quit [Remote host closed the connection]
TomyWork has joined #ruby
r29v has joined #ruby
phroa has quit [Remote host closed the connection]
phroa has joined #ruby
Lewix has quit [Ping timeout: 244 seconds]
Lewix has joined #ruby
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
rainmanjam has joined #ruby
orbyt_ has quit [Ping timeout: 245 seconds]
_whitelogger has joined #ruby
r29v has quit [Quit: r29v]
kyrylo has joined #ruby
_whitelogger has joined #ruby
ramfjord has joined #ruby
poontangmessiah has joined #ruby
kyrylo has quit [Read error: Connection reset by peer]
kyrylo has joined #ruby
ramfjord has quit [Ping timeout: 244 seconds]
_falsebay_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jottr__ has joined #ruby
dellavg has joined #ruby
eddof13 has joined #ruby
kyrylo has quit [Read error: Connection reset by peer]
kyrylo has joined #ruby
jottr__ has quit [Ping timeout: 248 seconds]
eddof13 has quit [Client Quit]
jottr__ has joined #ruby
rainmanjam has quit []
rainmanjam has joined #ruby
rainmanjam has quit [Read error: Connection reset by peer]
rainmanjam has joined #ruby
SeepingN has joined #ruby
kyrylo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
SeepingN has quit [Client Quit]
code_zombie has quit [Quit: Leaving]
SeepingN has joined #ruby
SeepingN has quit [Remote host closed the connection]
jottr__ has quit [Ping timeout: 244 seconds]
jottr__ has joined #ruby
mynameisdebian has joined #ruby
cybcypha has joined #ruby
cybcypha has quit [Client Quit]
rainmanjam has quit []
rainmanjam has joined #ruby
rainmanjam has quit [Read error: Connection reset by peer]
jottr__ has quit [Ping timeout: 258 seconds]
poontangmessiah has quit [Ping timeout: 245 seconds]
bhaak has joined #ruby
mynameisdebian has quit [Ping timeout: 245 seconds]
suukim has joined #ruby
segy has quit [Quit: ZNC - http://znc.in]
poontangmessiah has joined #ruby
duderonomy has joined #ruby
segy has joined #ruby
tsujp has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
tsujp has joined #ruby
Fernando-Basso has joined #ruby
_whitelogger has joined #ruby
jmcgnh has quit [Ping timeout: 244 seconds]
jmcgnh has joined #ruby
cd has quit [Quit: cd]
mat_bug has joined #ruby
jottr__ has joined #ruby
rubydoc has quit [Ping timeout: 272 seconds]
gix- has quit [Ping timeout: 244 seconds]
bitwinery has quit [Quit: Leaving]
conta has joined #ruby
jottr__ has quit [Ping timeout: 258 seconds]
conta has quit [Quit: conta]
conta has joined #ruby
conta has quit [Read error: Connection reset by peer]
conta has joined #ruby
kent\n has joined #ruby
poontangmessiah_ has joined #ruby
poontangmessiah_ has quit [Max SendQ exceeded]
poontangmessiah_ has joined #ruby
poontangmessiah_ has quit [Max SendQ exceeded]
poontangmessiah has quit [Ping timeout: 258 seconds]
poontangmessiah_ has joined #ruby
poontangmessiah_ has quit [Max SendQ exceeded]
poontangmessiah_ has joined #ruby
poontangmessiah_ has quit [Remote host closed the connection]
Rudd0 has quit [Remote host closed the connection]
involans has joined #ruby
conta has quit [Remote host closed the connection]
poontangmessiah has joined #ruby
poontangmessiah has quit [Max SendQ exceeded]
poontangmessiah has joined #ruby
hyuke has quit [Ping timeout: 244 seconds]
poontangmessiah has quit [Max SendQ exceeded]
poontangmessiah has joined #ruby
hyuke has joined #ruby
poontangmessiah has quit [Remote host closed the connection]
conta has joined #ruby
TomyWork has quit [Remote host closed the connection]
conta has quit [Quit: conta]
conta has joined #ruby
drincruz_ has joined #ruby
drincruz_ has quit [Ping timeout: 244 seconds]
kent\n has quit [Quit: Quitting]
Rudd0 has joined #ruby
involans has quit [Quit: involans]
TomyWork has joined #ruby
kent\n has joined #ruby
jottr__ has joined #ruby
TomyWork has quit [Remote host closed the connection]
jottr__ has quit [Ping timeout: 258 seconds]
jottr__ has joined #ruby
conta has quit [Quit: conta]
jottr__ has quit [Ping timeout: 244 seconds]
conta has joined #ruby
conta has quit [Quit: conta]
conta has joined #ruby
tdy1 has quit [Ping timeout: 246 seconds]
nerdius has quit [Read error: Connection reset by peer]
nerdius has joined #ruby
Inline__ has joined #ruby
jottr__ has joined #ruby
Inline__ has quit [Remote host closed the connection]
Inline has quit [Ping timeout: 264 seconds]
CrazyEddy has quit [Ping timeout: 244 seconds]
Inline has joined #ruby
tdy1 has joined #ruby
involans has joined #ruby
gigetoo has quit [Ping timeout: 245 seconds]
yokel has quit [Ping timeout: 258 seconds]
jottr__ has quit [Ping timeout: 245 seconds]
Nicmavr has quit [Ping timeout: 245 seconds]
gigetoo has joined #ruby
tdy1 has quit [Read error: error:1408F119:SSL routines:ssl3_get_record:decryption failed or bad record mac]
yokel has joined #ruby
mikecmpbll has joined #ruby
shirak_ has joined #ruby
DaniG2k has joined #ruby
DaniG2k has quit [Client Quit]
foxxx0 has quit [Quit: foxxx0]
Fernando-Basso has quit [Remote host closed the connection]
Tristan-Speccy has joined #ruby
rubydoc has joined #ruby
foxxx0 has joined #ruby
jottr__ has joined #ruby
jottr__ has quit [Ping timeout: 268 seconds]
<barg> am i supposed to have a system bundle and a regular bundle?
<barg> -/usr/local/bin/bundle, and /usr/local/opt/ruby/bin/bundle ?
AJA4350 has joined #ruby
<barg> also why is system ruby in /usr/bin whereas (system?) bundle is /usr/local/bin/ ?
<barg> also, i thought i had just two bundles, system and regular, but turns out i actually have three bundles.. third being /usr/local/lib/ruby/gems/2.6.0/bin what's the purpose of that one?
reber has joined #ruby
shirak_ has quit [Remote host closed the connection]
shirak_ has joined #ruby
shirak__ has joined #ruby
shirak_ has quit [Ping timeout: 245 seconds]
jottr__ has joined #ruby
conta has quit [Quit: conta]
kyrylo has joined #ruby
jottr__ has quit [Ping timeout: 268 seconds]
mikecmpb_ has joined #ruby
mikecmpbll has quit [Ping timeout: 248 seconds]
elated has joined #ruby
suukim has quit [Quit: Konversation terminated!]
shirak__ has quit [Ping timeout: 244 seconds]
tdy1 has joined #ruby
kyrylo has quit [Read error: Connection reset by peer]
kyrylo has joined #ruby
mynameisdebian has joined #ruby
ellcs has joined #ruby
mynameisdebian has quit [Ping timeout: 272 seconds]
kyrylo has quit [Read error: Connection reset by peer]
kyrylo has joined #ruby
Swyper has joined #ruby
bmurt has joined #ruby
lucasb has joined #ruby
ellcs has quit [Ping timeout: 250 seconds]
kyrylo has quit [Read error: Connection reset by peer]
kyrylo has joined #ruby
chunkypuffs has quit [Remote host closed the connection]
<havenwood> barg: I linked this yesterday, which explains default gems: https://stdgems.org/
<havenwood> barg: Note, the default and bundled gems ship with Ruby and are in a different directory than gems you install.
<havenwood> barg: GEM_HOME is the dir where gem install. GEM_PATH is a colon delimited list of dirs that Ruby will look for gems in.
<havenwood> barg: It's normal for gems to install in only one place, but to look for default gems in addition to that place.
Esa_ has joined #ruby
kyrylo has quit [Read error: Connection reset by peer]
kyrylo has joined #ruby
kyrylo has quit [Read error: Connection reset by peer]
kyrylo has joined #ruby
kyrylo has quit [Read error: Connection reset by peer]
kyrylo has joined #ruby
kyrylo has quit [Read error: Connection reset by peer]
kyrylo has joined #ruby
henninb has joined #ruby
zombyz03 has joined #ruby
zombyz03 has quit [Excess Flood]
Esa_ has quit []
Xiti has quit [Quit: Xiti]
jottr__ has joined #ruby
aphprentice__ has joined #ruby
jottr__ has quit [Ping timeout: 268 seconds]
<IGnorAND> o/
<IGnorAND> I have several rules I want to check on. I made different classes (check_if_starts_with_dash, check_if_ends_in_dash, check_minimum_length, check_maximum_length etc) Would it make sense to make these self functions so I dont instantiate the objects
<havenwood> IGnorAND: Those look like functions that would be fine in a module instead of a class.
<IGnorAND> havenwood: yeah, trying to apply ruby logic to php. php has no modules.
<IGnorAND> well, not in the same sense
jottr__ has joined #ruby
<havenwood> IGnorAND: It's hard to say without more context. I'd suggest a module if you have no state, a singleton class if you have a single instance of state, and a class if you have multiple instances of state.
<havenwood> IGnorAND: Modules with module_function allow direct, explicit usage or including the module.
<havenwood> IGnorAND: That's ^ an intro to modules that gets you up to module_function.
tdy1 has quit [Read error: error:1408F119:SSL routines:ssl3_get_record:decryption failed or bad record mac]
involans has quit [Read error: Connection reset by peer]
tdy1 has joined #ruby
<IGnorAND> havenwood: thanks
<havenwood> IGnorAND: no prob - and here's simple module function usage: https://gist.github.com/havenwood/6d91ebf489ac7739a4d10aaa79ed5b24
jottr__ has quit [Ping timeout: 245 seconds]
<havenwood> IGnorAND: I didn't show module usage with classes, but they can be included, prepended and extended into classes as well.
<qbrd[m]> I learn so much just idling... lol
chunkypuffs has joined #ruby
Xiti has joined #ruby
Esa_ has joined #ruby
reber has quit [Remote host closed the connection]
conta has joined #ruby
uranoss has joined #ruby
suukim has joined #ruby
<barg> havenwood: thanks. GEM_HOME and GEM_PATH are created by RVM thought, right? so I guess only apply when one has/uses RVM. The command you mentioned earlier- gem env gemdir is good.. I just looked at stdgems.org, they link to a video explaining things, though unfortunately the guy doing the video doesn't speak English clearly
ZAJDAN has quit [Read error: Connection reset by peer]
ZAJDAN has joined #ruby
jottr__ has joined #ruby
<havenwood> barg: GEM_HOME and GEM_PATH are RubyGems things that aren't specific to RVM.
<havenwood> barg: RubyGems has defaults for these two locations. Those two environment variables will override the defaults. RVM and chruby happen to use those to set Ruby behavior, but they are part of RubyGems and you can use them directly if you'd like.
<barg> if i do echo $GEM_HOME I get nothing
<havenwood> barg: Then it's unset and the default is used.
kyrylo has quit [Read error: Connection reset by peer]
<havenwood> barg: Here's how chruby sets these Ruby environment variables: https://github.com/postmodern/chruby/blob/master/share/chruby/chruby.sh#L42-L58
kyrylo has joined #ruby
<havenwood> barg: You can see your GEM_PATH equivalent with: gem env gempath
<havenwood> barg: If you set GEM_PATH, it will override that.
jottr__ has quit [Ping timeout: 258 seconds]
<havenwood> barg: These are RubyGems conventions.
<havenwood> barg: I referred to the GEM_HOME and GEM_PATH by the environment variables, since that's what folk use to override the default locations. You could alternatively just say gem home and gem path.
<havenwood> barg: The default gem home is a single location to install gems. The default gem path is a colon delimited list of places to look for gems. Does that make sense?
englishm has quit [Excess Flood]
jottr__ has joined #ruby
englishm has joined #ruby
Flyingdog has joined #ruby
jottr__ has quit [Ping timeout: 245 seconds]
D9 has quit [Ping timeout: 245 seconds]
<barg> so i understand that there are two locations that gems are installed, one for default and bundled gems, and one for gems i install. I see three gem related paths listed by gem env, /Library/Ruby/Gems/2.3.0 and /Users/apple/.gem/ruby/2.3.0 and /System/Library/Frameworks/Ruby.framewo... Which is which?
FrostCandy has joined #ruby
SeepingN has joined #ruby
_falsebay_ has joined #ruby
<havenwood> barg: What is the output of: gem env gem_path
<havenwood> barg: That is your gem path.
orbyt_ has joined #ruby
<havenwood> gem env gempath | tr ":" "\n"
<barg> gem env gempath works, thanks
<havenwood> barg: Those appear to be locations for the gem home, the --user-local gem home alternative, and the default gems.
<havenwood> barg: As I've mentioned, system Ruby is for your system on macOS. Developers typically leave it alone.
<barg> yeah, thanks
<havenwood> barg: System Ruby installs to a path that requires sudo by default. You can install with a --user-local flag to target a fallback default location in your home directory.
<havenwood> barg: Most folk don't bother to read up on RubyGems settings and just use RVM, chruby or rbenv to set those things properly if they're using multiple Rubies. Plenty of folk prefer to learn the RubyGems conventions, which seems to be what you want to do. I'd suggest looking more closely at the RubyGems code if you're interested.
kyrylo has quit [Read error: Connection reset by peer]
kyrylo has joined #ruby
<barg> isn't it a bit dangerous to use something that runs on top of something else, without knowing the basics of what happens manually.. ?
SeepingN has quit [Quit: The system is going down for reboot NOW!]
<barg> it just adds more complexity and makes issues even harder to resolve
<barg> because even more is hidden
kyrylo has quit [Read error: Connection reset by peer]
jottr__ has joined #ruby
kyrylo has joined #ruby
kyrylo has quit [Read error: Connection reset by peer]
kyrylo has joined #ruby
jottr__ has quit [Ping timeout: 245 seconds]
<barg> i had some old windows open with the old path, but with the newer path, i get this for gem env gempath /Users/apple/.gem/ruby/2.6.0:/usr/local/lib/ruby/gems/2.6.0:/usr/local/Cellar/ruby/2.6.3/lib/ruby/gems/2.6.0 Regarding the first directory, i don't have it on my system, which i guess is ok. I have /Users/apple/.gem/ruby/2.3.0/ so i guess that is ignored since it's not in the delimited paths
<barg> . I recognise stuff /usr/local/lib/ruby/gems/2.6.0/bin as stuff I installed like nokogiri, and the third one, the Cellar one looks like some old stuff.. i heard cellar was brew related.
kyrylo has quit [Read error: Connection reset by peer]
<barg> At the moment, the issue i see is that if i do rails new asdfsfsdfs then it says "No such file or directory -- /usr/local/lib/ruby/gems/2.6.0/gems/bundler-2.0.2/exe/bundle (LoadError)" If I do which gem, it says /usr/local/opt/ruby/bin/gem and if i do gem --version it says 3.0.3 so should I do gem install bundler , or is there a version issue?
kyrylo has joined #ruby
<barg> and if i do gem which bundler, then it says /usr/local/Cellar/ruby/2.6.3/lib/ruby/2.6.0/bundler.rb
ElFerna has joined #ruby
<barg> if i do gem install bundler, it says "bundler's executable "bundle" conflicts with /usr/local/lib/ruby/gems/2.6.0/bin/bundle"
henninb has quit [Remote host closed the connection]
Sithembewena has joined #ruby
Sithembewena has quit [Client Quit]
<havenwood> barg: gem install bundler --force
<havenwood> barg: As to your question about it being dangerous to have abstractions that handle things properly, no, I don't think that's particularly dangerous.
<barg> is it designed to work when underlying things are broken and conflicting?
<havenwood> barg: It's more dangerous to have everyone doing it wrong without actually reading the code. Better to have someone who's read the code do it right and just use that.
<havenwood> barg: For example, if you used chruby it would *just work* since the folk who wrote chruby understand the RubyGems internals.
<havenwood> barg: That whole tool is just a couple hundred lines of code.
<barg> but they can't control if somebody's path is wrong
<havenwood> chruby does set PATH correctly
<havenwood> ¯\_(ツ)_/¯
<havenwood> I do think the Homebrew post install instructions should be improved.
<barg> i guess brew isn't so good for installing ruby
<havenwood> It's fine, you just need to add your RubyGems bin/ dir to PATH, which they don't mention.
<barg> right now i get an error when doing rails new sdfdsds3 Could not find 'bundler' (1.17.2) required by your /Users/apple/rubymac/sdfsdfdsfd3/Gemfile.lock. (Gem::GemNotFoundException) To update to the latest version installed on your system, run `bundle update --bundler`. To install the missing version, run `gem install bundler:1.17.2`
<havenwood> barg: Did you try its suggestion?
<havenwood> bundle update --bundler
<barg> was gonna say, should i run those two suggested commands, and in that order?
<barg> ok
<havenwood> barg: Then a plain ole: bundle
<havenwood> barg: run Rails commands with: bin/rails ...
<havenwood> For that matter, bundle with: bin/bundle
<havenwood> barg: Normally, with bundle, you prefix your command with `bundle exec`, but Rails provides binstubs in bin/ dir.
<barg> well, rails new sdfsfsd5 works since doing that second command
<barg> -/usr/bin/rails --version says "Rails is not currently installed on this system".
<barg> -/usr/local/bin/rails woks
<havenwood> barg: bin/rails -v
<havenwood> barg: (From the directory of your app.)
<havenwood> barg: There's a bin/ folder in your Rails app directory. In that directory is a `rails` binstub that Rails means you to use.
<havenwood> barg: From the directory of your Rails app, run: bin/rails -v
<havenwood> barg: Or if you don't want to use that binstub, prefix `bundle exec` to your commands.
<havenwood> Like: bundle exec rails -v
wallace_mu has joined #ruby
<havenwood> Or: bin/rails -v
<havenwood> barg: Does that make sense?
<barg> well, rails new wouldn't be done with bin/rails
<barg> also, they are the same rails version
<havenwood> barg: No, normally you'd do that command with: rails _version here_ new
<havenwood> barg: Like: rails _6.0.0.rc2_ new asdf
<havenwood> barg: Unless you want to use the latest version of the Rails gem installed, in which case you can just: rails new asdf
<barg> yeah i used the latest
<havenwood> barg: You'll want to have the RubyGems bin/ dir of the Ruby you're using first in your PATH so you don't have to specify the full path of the `rails` command.
<havenwood> barg: Once you've created an app, use `bundle exec rails` or `bin/rails`
<havenwood> barg: You'll want to use the exact version of Rails from your Gemfile.lock, rather than whatever you happen to have installed at latest version.
<barg> so ./bin in path?
<havenwood> no
<havenwood> barg: just relative to the root directory of your app
<havenwood> barg: cd into your rails app, and type: bin/rails -v
<barg> ok so no need for path for that
<havenwood> barg: nope
<havenwood> you don't need to have a command in PATH if you're calling it directly
<barg> you mention having "the RubyGems bin/ dir of the Ruby you're using first in your PATH" Do you mean the project one?
<barg> is the RubyGems bin dir the relative one?
<barg> or one of the system-wide paths, if so, which?
ElFerna has quit [Ping timeout: 245 seconds]
<havenwood> barg: echo "$(gem env gemdir)/bin"
<havenwood> barg: that ^ directory
<havenwood> barg: Look under EXECUTABLE DIRECTORY for: gem env
kyrylo has quit [Read error: Connection reset by peer]
kyrylo has joined #ruby
kyrylo has quit [Read error: Connection reset by peer]
<barg> thanks.. so what would've put rails in /usr/local/bin?
<barg> (I understand i shouldn't run the rails in /usr/local/bin)
kyrylo has joined #ruby
SeepingN has joined #ruby
SeepingN is now known as Guest3542
fphilipe_ has quit [Ping timeout: 246 seconds]
kyrylo has quit [Client Quit]
MrCrackPot has joined #ruby
<havenwood> barg: I don't know of any tools that would install Rails gem executable in /usr/local/bin. What'd you do? :P
<havenwood> barg: That directory doesn't even ship with macOS. It's not where brew would install a gem, unless you changed the defaults.
<havenwood> barg: If you set `export GEM_HOME="/usr/local/bin"` then did a `gem install rails` it would install there. But that's true for any directory.
<havenwood> Also, don't do that and if you did, undo it.
<havenwood> barg: If you've messed up brew too badly, you can always copy the list of packages you've installed `brew leaves | tr "\n" " " | pbcopy`, delete /usr/local and then reinstall Homebrew and reinstall your packages.
<havenwood> barg: Or, better yet use Homebrew's uninstall script: ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/uninstall)"
involans has joined #ruby
<barg> looks like maybe /usr/local/bin has directories that link to the Cellar directory so each directory or most directories, within it is a shortcut https://gist.github.com/gartha1/d6fa7833b0715c8675e1cc03350cd6ee
<barg> and the Cellar directory is a brew thing
<havenwood> barg: yeah, that's how brew works
<barg> ok, so you think i still shouldn't have a /usr/local/bin/rails file
<havenwood> barg: That's not a normal thing to have on a brew install. I don't know how you ended up with that.
<barg> would brew normally ever install rails?
<havenwood> no
<barg> ok thanks. i'll try to enquire why i might have that and see if i get any answers re that, before i try to fix it
<barg> many thanks
<havenwood> you installed it there, likely
<havenwood> i told you my theory, you set it as gem home for a stint
<havenwood> good luck!
<barg> i doubt i did anything that weird! i don't even know what a stint is!
<barg> and i only found out about GEM_HOME since you mentioned it a bit earlier!
involans has quit [Quit: involans]
Tempesta_ has joined #ruby
<havenwood> barg: look at the file
<havenwood> barg: you may find a clue
<barg> a googleof /usr/local/bin/rails gets just over a million results
<havenwood> barg: That's a popular directory for installing things on various distros.
Tempesta has quit [Ping timeout: 244 seconds]
<havenwood> barg: Many distros have a Rails package.
<havenwood> barg: Homebrew does not.
<barg> oh maybe i tried another package manager besides brew
<barg> like macports
jordanm has quit [Read error: Connection reset by peer]
<havenwood> ¯\_(ツ)_/¯
<barg> with osx would /usr/local/bin normally not even be in the path?
jordanm has joined #ruby
<havenwood> It doesn't even exist on a fresh macOS install...
<barg> hehehe
<barg> does brew put it in the path though?
orbyt_ has quit [Read error: Connection reset by peer]
<barg> what's the point of brew putting all those shortcuts in there?
fphilipe_ has joined #ruby
<havenwood> barg: Since /usr/local/bin isn't in PATH, Brew will prepend it.
<havenwood> barg: Err, actually brew uses /usr/local/bin since it is in path. There are no files in /usr/local by default though.
<barg> ok well i've added export PATH="$(gem env gemdir)/bin:$PATH"
<barg> to my bash_prfoile
<havenwood> (it used to not be)
<havenwood> things change
orbyt_ has joined #ruby
<havenwood> barg: I used to add it to PATH by editing /etc/paths, which I thought was nicer.
<havenwood> See: sudo man path_helper
<barg> yeah my rails file is not in /usr/local, it's in /usr/local/bin but i guess you're saying it still shouldn't be there... anyhow now it'll run the gemdir one 'cos i adjusted the path. Thanks
<barg> -/usr/local is just directories
<havenwood> barg: is it a file or symlink?
<havenwood> barg: command -V /usr/local/bin/rails
<havenwood> barg: what's in it?: head /usr/local/bin/rails
Exuma has joined #ruby
fphilipe_ has quit [Ping timeout: 250 seconds]
<havenwood> barg: Normally, you prepend your RubyGems bin/ dir and Ruby bin/ dir to PATH, so these other commands are behind your currently used Ruby.
<barg> the contents of /usr/local/bin/rails https://gist.github.com/gartha1/7c3de37e70e10540aca97b0380fe91db
wallace_mu has quit [Remote host closed the connection]
conta has quit [Remote host closed the connection]
Guest3542 has quit [Quit: The system is going down for reboot NOW!]
wallace_mu has joined #ruby
wallace_mu has quit [Remote host closed the connection]
<havenwood> barg: so it's an old Rails binstub, fwiw. delete it. consider a fresh Homebrew install to undo whatever else you've done.
wallace_mu has joined #ruby
* havenwood starts his advice with, "first, format your hard drive"
cd has joined #ruby
<havenwood> I wish there was a Ruby equivalent of Elixir's Nerves: https://nerves-project.org/
<havenwood> I'm jealous of that 5 second Pi boot. Must be faster with a Pi 4.
<havenwood> :)
conta has joined #ruby
wallace_mu has quit [Ping timeout: 246 seconds]
involans has joined #ruby
jottr__ has joined #ruby
mat_bug has quit [Remote host closed the connection]
mat_bug has joined #ruby
jottr__ has quit [Ping timeout: 245 seconds]
mat_bug has quit [Ping timeout: 264 seconds]
conta has quit [Remote host closed the connection]
wildtrees has joined #ruby
fphilipe_ has joined #ruby
wildtrees has quit [Remote host closed the connection]
wildtrees has joined #ruby
lalitmee has joined #ruby
suukim has quit [Quit: Konversation terminated!]
orbyt_ has quit [Quit: Textual IRC Client: www.textualapp.com]
lucasb has quit [Quit: Connection closed for inactivity]
involans has quit [Quit: involans]
conta has joined #ruby
mat_bug has joined #ruby
jottr__ has joined #ruby
mikecmpb_ has quit [Ping timeout: 244 seconds]
jottr__ has quit [Ping timeout: 245 seconds]
fphilipe_ has quit [Ping timeout: 252 seconds]
uranoss has quit [Quit: Connection closed for inactivity]
mikecmpbll has joined #ruby
orbyt_ has joined #ruby
mat_bug has quit [Ping timeout: 276 seconds]
mat_bug has joined #ruby
Frobozz_ has joined #ruby
jottr__ has joined #ruby
Frobozz has quit [Ping timeout: 248 seconds]
Frobozz_ is now known as Frobozz
<adam12> I've never actually timed the Pi boot time but I think the next Pi I deploy will be FreeBSD.
jottr__ has quit [Ping timeout: 246 seconds]
shirak__ has joined #ruby
mikecmpbll has quit [Quit: inabit. zz.]
lalitmee has quit [Quit: Leaving]
lalitmee has joined #ruby
elated has quit [Quit: Leaving]
dionysus70 has joined #ruby
chalkmonster has joined #ruby
shirak has joined #ruby
conta has quit [Remote host closed the connection]
shirak__ has quit [Ping timeout: 272 seconds]
orbyt_ has quit [Ping timeout: 244 seconds]
shirak_ has joined #ruby
shirak has quit [Ping timeout: 248 seconds]
Swyper has quit [Remote host closed the connection]
Swyper has joined #ruby
fphilipe_ has joined #ruby
bitwinery has joined #ruby
fphilipe_ has quit [Ping timeout: 276 seconds]
dellavg has quit [Ping timeout: 258 seconds]
shirak has joined #ruby
shirak_ has quit [Ping timeout: 246 seconds]
h1r0P0p18 has joined #ruby
h1r0P0p18 has quit [Remote host closed the connection]
orbyt_ has joined #ruby
orbyt_ has quit [Client Quit]
jottr__ has joined #ruby
fphilipe_ has joined #ruby
jottr__ has quit [Ping timeout: 246 seconds]
Esa_ has quit []
EDMhotdog has joined #ruby
<EDMhotdog> hey guys :))) have a great day and please have a look at my friends house music productions!!!! THANKYOU so much!!! https://www.youtube.com/watch?v=fXEC_zGSW3w
<EDMhotdog> The music will give you smiles, happiness and boing boing jump up energy! :D REMEMBA 2 SUBSCRIBE :D
EDMhotdog has left #ruby [#ruby]
MrCrackPot has quit [Ping timeout: 268 seconds]
fphilipe_ has quit [Ping timeout: 264 seconds]
ellcs has joined #ruby
Exuma has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Exuma has joined #ruby
lalitmee has quit [Ping timeout: 272 seconds]
<baweaver> !spam EDMhotdog
ellcs has quit [Ping timeout: 264 seconds]
mikecmpbll has joined #ruby
mikecmpbll has quit [Client Quit]
shansen has quit [Remote host closed the connection]
jottr__ has joined #ruby
chalkmonster has quit [Quit: WeeChat 2.5]
orbyt_ has joined #ruby
mat_bug has quit [Ping timeout: 252 seconds]
shansen has joined #ruby
mat_bug has joined #ruby
dionysus70 has quit [Ping timeout: 258 seconds]
Exuma has quit [Quit: Textual IRC Client: www.textualapp.com]
Huck777 has joined #ruby
FrostCandy has quit []
jottr__ has quit [Ping timeout: 244 seconds]
fphilipe_ has joined #ruby
AJA4350 has quit [Ping timeout: 258 seconds]
Tempesta_ has left #ruby ["Closing Channel, bye."]
Tempesta has joined #ruby
jottr__ has joined #ruby
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jottr__ has quit [Ping timeout: 272 seconds]
jottr__ has joined #ruby
mat_bug has quit [Remote host closed the connection]
mat_bug has joined #ruby
lightstalker has joined #ruby
bitwinery has quit [Quit: Leaving]
shirak has quit [Ping timeout: 248 seconds]
shirak has joined #ruby
sameerynho has quit [Ping timeout: 268 seconds]
shirak has quit [Ping timeout: 246 seconds]
joast has quit [Quit: Leaving.]
poontangmessiah has joined #ruby