<kevinem>
because rails kept saying i'm using some old version of gems
<kevinem>
and it was dreadfully slow
<centrx>
I'm not sure what you mean but this advice is about 5 years ld
<centrx>
Use bundle/bundler
<centrx>
Then you run bundle exec rails
<centrx>
etc
<kevinem>
oh...i'm reading an old book
<centrx>
well that URL is yeah
<centrx>
You should not start using Ruby 1.8 now, in 2014
<kevinem>
i ran these two commands sudo gem install rubygems-update sudo update_rubygems
<centrx>
I'm not sure what the second one is
<centrx>
I would install the Ubuntu packages for Ruby
<centrx>
What version is it you might ask, probably 1.9 or 2.0 or 2.1
<kevinem>
sudo update_rubygems
<centrx>
Then you use gem install and/or bundler
<kevinem>
it's on the website...the second command
<kevinem>
version 1.9
<centrx>
I don't know what update_rubygems is
<centrx>
"f you're on Ubuntu 9.04 or later, this might work:"
<centrx>
that is so old
<kevinem>
yup
<ohsix>
or it really hasn't changed since then
<centrx>
Ubuntu 9.04 (Jaunty Jackalope), released on 23 April 2009,[72] was Canonical's tenth release of Ubuntu.
<kevinem>
but i thought it might work
<centrx>
I always use a Gemfile and bundle so many it is different
<centrx>
*maybe
<kevinem>
but now gems completely fails
<kevinem>
Checked in 'GEM_PATH=/home/kevin/.gem/ruby/1.9.1:/usr/lib/ruby/gems/1.9.1', execute `gem env` for more information
<kevinem>
from /usr/local/lib/site_ruby/1.9.1/rubygems/dependency.rb:322:in `to_spec'
<kevinem>
from /usr/local/lib/site_ruby/1.9.1/rubygems/core_ext/kernel_gem.rb:58:in `gem'
<kevinem>
from /usr/local/bin/bundle:22:in `<main>'
vintik has quit [Quit: Leaving...]
<kevinem>
what is bundle/bundler?
jtoy has quit [Ping timeout: 264 seconds]
<kevinem>
/usr/local/lib/site_ruby/1.9.1/rubygems/dependency.rb:313:in `to_specs': Could not find 'railties' (>= 0) among 0 total gem(s) (Gem::LoadError)
<kevinem>
Checked in 'GEM_PATH=/home/kevin/.gem/ruby/1.9.1:/usr/lib/ruby/gems/1.9.1', execute `gem env` for more information
<kevinem>
from /usr/local/lib/site_ruby/1.9.1/rubygems/dependency.rb:322:in `to_spec'
<kevinem>
from /usr/local/lib/site_ruby/1.9.1/rubygems/core_ext/kernel_gem.rb:58:in `gem'
<kevinem>
from /usr/local/bin/rails:22:in `<main>'
<kevinem>
this is the result of "rails new r4rmusic1 -d mysql"
<centrx>
If you are using Rails you should definitely use bundler
<jhass>
kevinem: sounds like you messed up your install. purge all ruby related packages. rm -rf $HOME/.gem. rm -rf all remaining traces. Start again
<centrx>
bundler readers your Gemfile, which Rails uses, to determine what gems to install
<jhass>
kevinem: this time don't follow advice older than two years
<kevinem>
jhass: hmmm...i tried reinstalling but the same happens, i deleted everything apart from .gem in home...lemme try that
<jhass>
kevinem: list what you deleted
<centrx>
whoa what planet is this
<centrx>
what year am I
<kevinem>
jhass: i just ran these commands
<kevinem>
apt-get remove ruby-full
<kevinem>
apt-get autoremove
<jhass>
did you also remove that silly rubygems thingy?
<kevinem>
sudo rm -Rf /var/local/gems
<jhass>
did you verify all other installed ruby related packages where gone? especially rubygems related ones?
spuk has quit [Ping timeout: 255 seconds]
<kevinem>
the command gems did not work...i don't know how to check otherwise
<jhass>
also stuff like a $HOME/.gemrc or /etc/gemrc if that exists
spuk has joined #ruby-lang
<kevinem>
okay...lemme try
eddiezane_zzz is now known as eddiezane
jtoy has joined #ruby-lang
eddiezane is now known as eddiezane_zzz
marr has quit []
eddiezane_zzz is now known as eddiezane
eddiezane is now known as eddiezane_zzz
<kevinem>
jhass: no luck
<jhass>
maybe you should make a gist with the command you're trying the run, its whole output and the output of gem env
<kevinem>
right now what i did is
<kevinem>
apt-get purge ruby
<kevinem>
rm -Rf .gem
<kevinem>
and installed ruby all over again
<kevinem>
but the same error happens when i try the command
<kevinem>
rails new r4rmusic1 -d mysql
<kevinem>
(remember i never installed rails after i installed ruby again now)
centrx has quit [Quit: Mead error: Connection reset by beer]
RobertBirnie has quit [Ping timeout: 255 seconds]
<kevinem>
i just did
<kevinem>
sudo apt-get install ruby-full
<kevinem>
and run this command
<kevinem>
Checked in 'GEM_PATH=/home/kevin/.gem/ruby/1.9.1:/usr/lib/ruby/gems/1.9.1', execute `gem env` for more information
<kevinem>
from /usr/local/lib/site_ruby/1.9.1/rubygems/dependency.rb:322:in `to_spec'
<kevinem>
from /usr/local/lib/site_ruby/1.9.1/rubygems/core_ext/kernel_gem.rb:58:in `gem'
<kevinem>
from /usr/local/bin/rails:22:in `<main>'
lun__ has quit [Remote host closed the connection]
<kevinem>
i did "bundle install" and it said everything installed
<jhass>
did you follow the link in the error message?
kek has joined #ruby-lang
kek has quit [Read error: No route to host]
<kevinem>
yup...(after you said so, to be truthfull)
michaeldeol has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
kek has joined #ruby-lang
<kevinem>
i did "gem install execjs"
<kevinem>
same error
<jhass>
did you read the error message and the readme?
shinnya has quit [Ping timeout: 250 seconds]
kek has quit [Ping timeout: 264 seconds]
<kevinem>
jhass: yup...and sorry again...but this time atleast it was not obvious
Hinkdogg__ has joined #ruby-lang
<kevinem>
i wont ask anything before making sure that i can't figure it out again
<jhass>
you know, programming is all about problem solving. Train that skill everywhere and anytime ;)
<kevinem>
thanks for cultivating a new kind of character in me :) [most of the time i skip these kinds of error messages, and try to think what will have gone wrong tracing back what i was doing]
<kevinem>
these kinda error messages never made any sense to me(atleast this is good, you should see openERP error messages)
mistym has joined #ruby-lang
toastynerd has joined #ruby-lang
<kevinem>
i will try to make sense of them, as far as i can, from now on ;)
toastynerd has quit [Read error: Connection reset by peer]
toastynerd has joined #ruby-lang
Raycaster has joined #ruby-lang
emmesswhy has quit [Quit: This computer has gone to sleep]
Raycaster has quit [Client Quit]
Raycaster has joined #ruby-lang
matp has quit [Quit: ZZZzzz…]
<kevinem>
jhass: can i ask you just one more thing?
Miphix has joined #ruby-lang
<kevinem>
why is all these commands 'rails', 'gem' everything take so long(last night i fell while i waited for the result of some issued command), when something's not right somewhere
<kevinem>
?
<jhass>
what's long?
<kevinem>
like may be 15 mins or more
<jhass>
uh, that's unusual
<kevinem>
i'll tell you the current scenario
<jhass>
a bundler may take that long, but usually not even in big projects
<kevinem>
i issued "rails generate model work"
<kevinem>
but i know database.yml is not edited
<kevinem>
i did it just to see what happens
<jhass>
it should work since that won't touch the db yet, only create the migration
jbardin has quit [Quit: jbardin]
<kevinem>
but 10mins?
<jhass>
not sure why it takes so long for you though
amclain has joined #ruby-lang
<kevinem>
i haven't got my result yet
<jhass>
does a simple ruby -e 'puts "hi"' take that long too?
<kevinem>
i don't think so...lemme try
arBmind1 has joined #ruby-lang
arBmind has quit [Ping timeout: 255 seconds]
<kevinem>
jhass: nope...that's fast
<jhass>
what about rake -T
<kevinem>
rake aborted!
<kevinem>
No Rakefile found (looking for: rakefile, Rakefile, rakefile.rb, Rakefile.rb)
<kevinem>
(See full trace by running task with --trace)
<kevinem>
what is rake?
davodavoo has joined #ruby-lang
<kevinem>
(just asked because we are in the conversation, don't make me say sorry)
<kevinem>
i'll google :D
<davodavoo>
I'm feeling heady. Where is an irc chat where ruby noobs ask veterans questions? (feeling like a vet)
<jhass>
kevinem: test both commands inside your rails app
<jhass>
davodavoo: you found it
<davodavoo>
lol ok
<jhass>
there's also #ruby and ##new2ruby
<jhass>
#ruby having more users
<jhass>
##new2ruby seemingly having degraded to a private smalltalk channel mostly
apt-get_ has quit [Quit: Quitte]
<jhass>
finally there's the glorious #rubyonrails if you're up for that
<davodavoo>
mehhh
<davodavoo>
tired of rails
<jhass>
maaany noobies there for you though :P
<jhass>
we sent them all there
<kevinem>
jhass: rake -T was fast
<kevinem>
returned a list
<kevinem>
davodavoo: never give up on anything
<jhass>
kevinem: mmh, no idea then, doesn't seem to be anything inherent to your environment
<kevinem>
haven't got my reply from rails yet :D
<kevinem>
i fell asleep last night like this
toastynerd has quit [Remote host closed the connection]
hagebake has quit [Ping timeout: 240 seconds]
davodavoo has quit [Ping timeout: 246 seconds]
<kevinem>
jjhass: does this make any sense to you?
<yell0wgh0st>
actually i am using liquid template language instead of erb
Lewix has joined #ruby-lang
<yorickpeterse>
erb was just an example
<yorickpeterse>
Perhaps your file names are not what Liquid expects?
<yorickpeterse>
(or extensions)
<yorickpeterse>
I haven't touched Liquid in years so I'm not really familiar with it anymore
abhi_rsd has joined #ruby-lang
<yell0wgh0st>
That says the error (so it looks like it works) but i triyed several type of name and it didn’t work, the correct name should be _template.liquid maybe wrong directory?
emmesswhy has quit [Quit: This computer has gone to sleep]
toastynerd has joined #ruby-lang
emmesswhy has joined #ruby-lang
WilfredTheGreat has quit [Read error: Connection reset by peer]
Meta5 has joined #ruby-lang
WilfredTheGreat has joined #ruby-lang
t4nk385 has joined #ruby-lang
<t4nk385>
Newbie here! How do puts/print a blank line?
<_dyrim>
Just `puts`
<_dyrim>
Or `puts ""`
<t4nk385>
Same for print?
<jhass>
t4nk385: try
<jhass>
t4nk385: you can also append an extra \n to the previous puts/print: puts "Hey\n\n"
DEac- has joined #ruby-lang
<centrx>
t4nk385, Use "irb" (or pry) to test things in a responsive Ruby console
<t4nk385>
Thank you
stamina has joined #ruby-lang
relix_ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<t4nk385>
Can I make my program not create a newline after puts?
Meta5 has quit [Client Quit]
<t4nk385>
puts "What is your name?"
<jhass>
use print
<t4nk385>
name = gets.chomp
<t4nk385>
Nice!
sharpmachine has joined #ruby-lang
Meta5 has joined #ruby-lang
brothmars has joined #ruby-lang
loincloth has joined #ruby-lang
Meta5 has quit [Client Quit]
vinhbachsy has quit []
omosoj has joined #ruby-lang
dm78 has quit [Remote host closed the connection]
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
yfeldblu_ has joined #ruby-lang
WilfredTheGreat has quit [Read error: Connection reset by peer]
saarinen has quit [Quit: saarinen]
yfeldblum has quit [Ping timeout: 240 seconds]
omosoj has quit [Ping timeout: 245 seconds]
saarinen has joined #ruby-lang
t4nk385 has quit [Quit: Page closed]
omosoj has joined #ruby-lang
emmesswhy has quit [Quit: This computer has gone to sleep]
WilfredTheGreat has joined #ruby-lang
HerrYasen is now known as valeri_ufo
WilfredTheGreat has quit [Read error: Connection reset by peer]
diegoviola has quit [Ping timeout: 245 seconds]
relix has joined #ruby-lang
yfeldblu_ has quit [Remote host closed the connection]
yfeldblum has joined #ruby-lang
toastynerd has quit [Remote host closed the connection]
WilfredTheGreat has joined #ruby-lang
DEac- has quit [Ping timeout: 260 seconds]
frank_o has quit [Ping timeout: 260 seconds]
yfeldblum has quit [Ping timeout: 260 seconds]
emmesswhy has joined #ruby-lang
djbkd has quit [Remote host closed the connection]
momomomomo_ has joined #ruby-lang
momomomomo has quit [Ping timeout: 260 seconds]
momomomomo_ is now known as momomomomo
yfeldblum has joined #ruby-lang
_ht has quit [Remote host closed the connection]
toastynerd has joined #ruby-lang
ecnalyr_ has joined #ruby-lang
yfeldblum has joined #ruby-lang
yfeldblum has quit [Remote host closed the connection]
skade has joined #ruby-lang
skade has quit [Read error: Connection reset by peer]
wallerdev has quit [Quit: wallerdev]
henrikhodne has quit [Ping timeout: 240 seconds]
marr has quit [Ping timeout: 245 seconds]
arBmind has joined #ruby-lang
Squarepy has quit [Quit: Leaving]
canton7 has quit [Ping timeout: 240 seconds]
henrikhodne has joined #ruby-lang
tbuehlmann has quit [Remote host closed the connection]
canton7 has joined #ruby-lang
WilfredTheGreat has quit [Read error: Connection reset by peer]
arBmind1 has joined #ruby-lang
arBmind has quit [Ping timeout: 240 seconds]
robbyoconnor has quit [Ping timeout: 240 seconds]
workmad3 has quit [Ping timeout: 250 seconds]
entitydc has joined #ruby-lang
DEac- has joined #ruby-lang
skade has quit [Ping timeout: 245 seconds]
havenwood has quit [Remote host closed the connection]
<entitydc>
hey all - I'm trying to write a multiline regular expression that will separate a text file after the last instance of the lines starting with (Seat \d*) -- example: https://gist.github.com/anonymous/260e2e141a595bdbbc11
skade has joined #ruby-lang
<entitydc>
anyone willing to lend a hand? Been trying to use not match operators but not having much luck
<centrx>
entitydc, I would parse each line individually
<centrx>
but it does look like the basic distinction is satisfying /Seat \d+:/
<centrx>
Unless a user can set his name to "Seat 1" or "Seat 55"
<centrx>
or with the colon in his name
<entitydc>
yeah -- I don't *think* they can, but I'm still looking for edge cases
WilfredTheGreat has joined #ruby-lang
<entitydc>
I think you're right about parsing each line individually -- was hoping to just chunk the file into multiple sections (following poker conventions, preflop/flop/turn/river) based on regex matching, but I think something a bit more involved is necessary
WilfredTheGreat has quit [Read error: Connection reset by peer]
<centrx>
entitydc, Parsing line by line might make it simpler in the end, it certainly keeps the regexes simpler
<entitydc>
thanks. time to give that a shot. this is barely readable as is.
omosoj has quit [Ping timeout: 246 seconds]
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
joelroa has joined #ruby-lang
Lewix has quit [Remote host closed the connection]
djbkd has joined #ruby-lang
Lewix has joined #ruby-lang
<apeiros>
entitydc: before, after = *data.match(/(.*^Seat \d+[^\n]*\n)(.*)/m).captures
entitydc has quit [Ping timeout: 246 seconds]
momomomomo_ has joined #ruby-lang
Lewix has quit [Ping timeout: 244 seconds]
momomomomo has quit [Ping timeout: 260 seconds]
momomomomo_ is now known as momomomomo
thiagoborges has joined #ruby-lang
wallerdev has joined #ruby-lang
michaeldeol has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
fusillicode has quit [Ping timeout: 260 seconds]
MichD is now known as michd
torrieri has joined #ruby-lang
yell0wgh0st has quit [Quit: yell0wgh0st]
centrx has quit [Quit: Mead error: Connection reset by beer]
michaeldeol has joined #ruby-lang
miqui has quit [Remote host closed the connection]
__butch__ has quit [Quit: Leaving.]
ur5us has joined #ruby-lang
yfeldblu_ has joined #ruby-lang
yfeldblu_ has quit [Remote host closed the connection]
yfeldblum has quit [Ping timeout: 240 seconds]
yfeldblum has joined #ruby-lang
yfeldblu_ has joined #ruby-lang
yfeldblum has quit [Remote host closed the connection]
yfeldblu_ has quit [Remote host closed the connection]
ecnalyr_ has quit [Remote host closed the connection]
yell0wgh0st has joined #ruby-lang
yfeldblum has joined #ruby-lang
emmesswhy has quit [Quit: This computer has gone to sleep]
futilegames has quit [Quit: futilegames]
yfeldblum has quit [Ping timeout: 240 seconds]
danijoo has quit [Read error: Connection reset by peer]
danijoo has joined #ruby-lang
ldnunes has quit [Quit: Leaving]
AKASkip has quit [Ping timeout: 246 seconds]
emmesswhy has joined #ruby-lang
robbyoconnor has joined #ruby-lang
saarinen has quit [Quit: saarinen]
jsodini has quit [Ping timeout: 240 seconds]
kuanding has quit [Read error: Connection reset by peer]
robbyoconnor has quit [Client Quit]
loincloth has quit [Remote host closed the connection]
malconis has quit [Ping timeout: 245 seconds]
mcantor has joined #ruby-lang
karamazov has quit [Remote host closed the connection]
<mcantor>
When I do conn = IO.popen("ssh remoteserver 'bash'", 'w+'); conn.sync = true; conn.write('echo "Hey"'); conn.gets("\n"); why does it hang?
<mcantor>
It hangs even if I do conn.flush before the gets
kuanding has joined #ruby-lang
loincloth has joined #ruby-lang
<chris2>
write a newline?
<mcantor>
chris2: Echo does that
<chris2>
.write doesnt
<chris2>
use .puts or \n
<chris2>
and consider expect.rb or net::ssh ;)
<mcantor>
I'm going as far as is practical without introducing the Net::SSH dependency first
<mcantor>
Oh wait. IO.popen("ssh remoteserver", 'w+') without the 'bash' part seems to be working
jgpawletko has quit [Quit: jgpawletko]
<mcantor>
I have no idea what "Pseudo-terminal will not be allocated because stdin is not a terminal." means
<chris2>
well, you didnt use expect.rb ;)
<chris2>
so there is no pty
<chris2>
still, the command is not executed on remote side