msaffitz has quit [Quit: Computer has gone to sleep.]
brianpWins has joined #ruby-lang
ddbt-nl has quit [Quit: Page closed]
fayimora has joined #ruby-lang
sora_h is now known as s0ra_h
fserb has quit [Quit: ttyl]
stardiviner has joined #ruby-lang
arooni-mobile has quit [Ping timeout: 246 seconds]
s0ra_h is now known as sora_h
mistym has joined #ruby-lang
mistym has quit [Changing host]
mistym has joined #ruby-lang
kyrylo has quit [Ping timeout: 245 seconds]
Axsuul has quit [Read error: Connection reset by peer]
fgomez has quit [Quit: leaving]
Axsuul has joined #ruby-lang
qwerxy has quit [Quit: offski]
srbartle_ has joined #ruby-lang
srbartlett has quit [Read error: Connection reset by peer]
qwerxy has joined #ruby-lang
fgomez has joined #ruby-lang
woollyams has joined #ruby-lang
fgomez has quit [Client Quit]
fgomez has joined #ruby-lang
fayimora has quit [Ping timeout: 248 seconds]
fayimora_ has joined #ruby-lang
bfreeman has quit [Quit: bfreeman]
jbsan has quit [Read error: Connection reset by peer]
jbsan has joined #ruby-lang
dasibre has quit [Remote host closed the connection]
dasibre has joined #ruby-lang
petercooper has quit [Remote host closed the connection]
ryez has joined #ruby-lang
srbartlett has joined #ruby-lang
srbartle_ has quit [Read error: Connection reset by peer]
felipe__ has joined #ruby-lang
felipe__ has quit [Read error: Connection reset by peer]
drumond19 has joined #ruby-lang
A124 has quit [Read error: Connection reset by peer]
qwerxy has quit [Quit: offski]
gsav has joined #ruby-lang
jperry2 has joined #ruby-lang
UNIXgod has quit [Changing host]
UNIXgod has joined #ruby-lang
florentg2 has quit [Quit: florentg2]
Z33K|Lux has joined #ruby-lang
jtoy has quit [Quit: jtoy]
Weems has quit []
savage-_ has quit [Remote host closed the connection]
bnagy has quit [Read error: Operation timed out]
seanstickle has joined #ruby-lang
perryh_away is now known as perryh
jperry2 has quit [Quit: Leaving.]
ilyam has joined #ruby-lang
DEac- has quit [Read error: Connection reset by peer]
igotnolegs has joined #ruby-lang
ryez has quit [Ping timeout: 245 seconds]
DEac- has joined #ruby-lang
bfreeman has joined #ruby-lang
woollyams has quit [Read error: Connection reset by peer]
SimSala has quit [Ping timeout: 245 seconds]
macmartine has joined #ruby-lang
woollyams has joined #ruby-lang
mrsolo has quit [Quit: Leaving]
asahi has joined #ruby-lang
tenderlove has quit [Remote host closed the connection]
dasibre has quit [Remote host closed the connection]
<asahi>
I've got something like array.each {|i| return i if str.include?(i) }. However, this seems to return the array instead of an item. can someone show me what I'm doing wrong?
banisterfiend has quit [Read error: Connection reset by peer]
shtirlic_ has joined #ruby-lang
<seanstickle>
array.detect{|i| str.include? i } is somewhat nicer
<asahi>
seanstickle: thanks. will try it out
shtirlic has quit [Ping timeout: 248 seconds]
saggymac has joined #ruby-lang
kyrylo has joined #ruby-lang
kyrylo has joined #ruby-lang
mistym has quit [Remote host closed the connection]
<asahi>
if I want to make it case insensitive is there a better way than this? array.detect{|i| str.downcase.include? i.downcase }
ilyam has quit [Quit: ilyam]
x0F has quit [Disconnected by services]
x0F_ has joined #ruby-lang
x0F_ is now known as x0F
neocoin has quit [Remote host closed the connection]
fgomez has quit [Quit: leaving]
seanstickle has quit [Quit: Nihil sub sole novum]
wpaulson_ has joined #ruby-lang
foca has joined #ruby-lang
igotnolegs has quit [Quit: Fire walk with me]
FluffyCode has joined #ruby-lang
FluffyCo_ has joined #ruby-lang
FluffyCode has quit [Read error: Connection reset by peer]
fgomez has joined #ruby-lang
jakko_ has joined #ruby-lang
jbsan_ has joined #ruby-lang
igotnolegs has joined #ruby-lang
jbsan has quit [Ping timeout: 252 seconds]
jbsan_ is now known as jbsan
Ben_ has joined #ruby-lang
Ben_ has left #ruby-lang [#ruby-lang]
bnagy has joined #ruby-lang
FluffyCo_ has quit [Remote host closed the connection]
FluffyCode has joined #ruby-lang
saggymac has quit [Ping timeout: 265 seconds]
krz has quit [Quit: krz]
saggymac has joined #ruby-lang
macmartine has quit [Quit: macmartine]
msaffitz has joined #ruby-lang
TheRealmccoy has joined #ruby-lang
gja has joined #ruby-lang
gsav has quit [Read error: Connection reset by peer]
n9yty has joined #ruby-lang
n9yty has quit [Client Quit]
jtoy has joined #ruby-lang
gsav has joined #ruby-lang
qpingu has left #ruby-lang [#ruby-lang]
gja has quit [Quit: This computer has gone to sleep]
bryancp has quit [Remote host closed the connection]
TheRealmccoy has quit [Read error: Connection reset by peer]
brianpWins has quit [Quit: brianpWins]
macmartine has joined #ruby-lang
FluffyCode has quit [Remote host closed the connection]
gnufied has joined #ruby-lang
jtoy has quit [Quit: jtoy]
krz has joined #ruby-lang
shtirlic_ has quit [Read error: Connection reset by peer]
shtirlic has joined #ruby-lang
imperator has joined #ruby-lang
jtoy has joined #ruby-lang
asahi has quit [Quit: Leaving.]
rmascarenhas has quit [Quit: leaving]
msaffitz has quit [Quit: Computer has gone to sleep.]
wlfman2k1 has joined #ruby-lang
msaffitz has joined #ruby-lang
TheRealmccoy has joined #ruby-lang
Weems has joined #ruby-lang
TheRealmccoy has quit [Client Quit]
rippa has joined #ruby-lang
drumond19 has quit [Remote host closed the connection]
zz_wasnotrice is now known as wasnotrice
zakkkkmm has joined #ruby-lang
zakkkkmm has quit [Client Quit]
dalekurt_ has joined #ruby-lang
chimkan has joined #ruby-lang
dalekurt has quit [Ping timeout: 245 seconds]
dalekurt_ is now known as dalekurt
wlfman2k1 has quit [Remote host closed the connection]
igotnolegs has quit [Quit: Computer has gone to sleep.]
lele has quit [Quit: Coyote finally caught me]
mytrile has joined #ruby-lang
lele has joined #ruby-lang
jayne has quit [Read error: Connection reset by peer]
jayne has joined #ruby-lang
TheHunter_1039 has quit [Quit: TheHunter_1039]
francisfish has joined #ruby-lang
mytrile has quit [Remote host closed the connection]
Z33K|Lux has quit []
outsmartin has quit [Quit: Leaving.]
mssola has joined #ruby-lang
zmack_ has quit [Read error: Connection reset by peer]
zmack has joined #ruby-lang
Silex- is now known as Silex
perryh is now known as perryh_away
srbartlett has quit [Remote host closed the connection]
sepp2k has joined #ruby-lang
seoaqua has joined #ruby-lang
qwerxy has quit [Quit: offski]
seoaqua has quit [Ping timeout: 246 seconds]
seoaqua has joined #ruby-lang
gnufied1 has quit [Read error: Connection reset by peer]
gnufied has joined #ruby-lang
anildigital_work has joined #ruby-lang
brushbox1 has joined #ruby-lang
dhruvasagar has joined #ruby-lang
brushbox has quit [Ping timeout: 245 seconds]
fserb has joined #ruby-lang
tonni_ has joined #ruby-lang
tonni has quit [Read error: Connection reset by peer]
apeiros_ has joined #ruby-lang
ryanf has quit [Quit: leaving]
tbuehlmann has joined #ruby-lang
woollyams has quit [Ping timeout: 244 seconds]
workmad3 has joined #ruby-lang
SiliconDon has joined #ruby-lang
stardiviner has joined #ruby-lang
yannis has joined #ruby-lang
stardiviner has quit [Client Quit]
M4g1c5t0rM has quit [Remote host closed the connection]
gasbakid has joined #ruby-lang
M4g1c5t0rM has joined #ruby-lang
youngin_ is now known as youngin
zmack has quit [Read error: Operation timed out]
fayimora_ has quit [Read error: Connection reset by peer]
fayimora has joined #ruby-lang
sora_h is now known as s0ra_h
fserb has quit [Quit: ttyl]
neocoin has quit [Remote host closed the connection]
zmack has joined #ruby-lang
cdt has joined #ruby-lang
qwerxy has joined #ruby-lang
Fullmoon has joined #ruby-lang
postmodern has quit [Quit: Leaving]
Fullmoon has quit [Client Quit]
zmack_ has joined #ruby-lang
robotmay has joined #ruby-lang
toretore has joined #ruby-lang
zmack has quit [Ping timeout: 256 seconds]
postmodern has joined #ruby-lang
WillMarshall has joined #ruby-lang
zmack_ has quit [Ping timeout: 246 seconds]
gnufied1 has joined #ruby-lang
tonni has joined #ruby-lang
tonni_ has quit [Ping timeout: 244 seconds]
gouthamvel has joined #ruby-lang
gouthamvel has left #ruby-lang [#ruby-lang]
zmack has joined #ruby-lang
gasbakid has quit [Read error: Operation timed out]
neoesque has quit [Remote host closed the connection]
gnufied has quit [Ping timeout: 248 seconds]
zmack_ has joined #ruby-lang
zmack_ has quit [Read error: Connection reset by peer]
zmack has quit [Read error: Connection reset by peer]
nevynxxx has joined #ruby-lang
dhruvasagar has quit [Ping timeout: 252 seconds]
zmack has joined #ruby-lang
dhruvasagar has joined #ruby-lang
fayimora has quit [Ping timeout: 264 seconds]
riffraff has quit [Quit: Leaving]
tejas has joined #ruby-lang
tejas has quit [Changing host]
tejas has joined #ruby-lang
Hakon|mbp has joined #ruby-lang
gja has quit [Ping timeout: 244 seconds]
fayimora has joined #ruby-lang
gasbakid has joined #ruby-lang
zmack has quit [Read error: Connection reset by peer]
zmack has joined #ruby-lang
gasbakid has quit [Ping timeout: 265 seconds]
s0ra_h is now known as sora_h
brianpWins has quit [Ping timeout: 256 seconds]
ngw has joined #ruby-lang
SiliconDon has quit [Quit: SiliconDon]
Hakon|mbp has quit [Quit: Leaving...]
WillMarshall has quit [Quit: Computer has gone to sleep.]
chimkan_ has quit [Ping timeout: 240 seconds]
mssola has quit [Read error: Operation timed out]
chimkan_ has joined #ruby-lang
Mch1 has left #ruby-lang [#ruby-lang]
Mchl has joined #ruby-lang
futurechimp has joined #ruby-lang
neocoin has joined #ruby-lang
tonni_ has joined #ruby-lang
naquad has quit [Read error: No route to host]
tonni has quit [Ping timeout: 252 seconds]
naquad has joined #ruby-lang
Hakon|mbp has joined #ruby-lang
mssola has joined #ruby-lang
solars has quit [Ping timeout: 246 seconds]
soahccc` is now known as soahccc
gsav has joined #ruby-lang
gouthamvel has joined #ruby-lang
gouthamvel has left #ruby-lang [#ruby-lang]
gouthamvel has joined #ruby-lang
postmodern has quit [Quit: Leaving]
cantonic_ has joined #ruby-lang
flak has joined #ruby-lang
flak is now known as Guest28645
Gekz has quit [Read error: Connection reset by peer]
rippa has quit [Ping timeout: 265 seconds]
cantonic has quit [Ping timeout: 265 seconds]
cantonic_ is now known as cantonic
gouthamvel has quit [Ping timeout: 244 seconds]
d3vic3 has joined #ruby-lang
Guest28645 has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
rippa has joined #ruby-lang
gasbakid has joined #ruby-lang
gouthamvel has joined #ruby-lang
srbartlett has joined #ruby-lang
dhruvasa1ar has joined #ruby-lang
dhruvasagar has quit [Ping timeout: 244 seconds]
solars has joined #ruby-lang
Guedes_out is now known as Guedes
sora_h is now known as s0ra_h
workmad3 has quit [Ping timeout: 244 seconds]
neocoin has quit [Read error: Connection reset by peer]
kyrylo has quit [Read error: Operation timed out]
neocoin has joined #ruby-lang
kyrylo has joined #ruby-lang
kyrylo has quit [Changing host]
kyrylo has joined #ruby-lang
fayimora has quit [Ping timeout: 264 seconds]
SimSala has joined #ruby-lang
kain has joined #ruby-lang
rippa has quit [Ping timeout: 248 seconds]
bryancp has joined #ruby-lang
neoesque has joined #ruby-lang
woollyams has joined #ruby-lang
futurechimp has quit [Ping timeout: 256 seconds]
rippa has joined #ruby-lang
gasbakid has quit [Quit: Quitte]
futurechimp has joined #ruby-lang
gasbakid has joined #ruby-lang
shtirlic has quit [Ping timeout: 256 seconds]
<andrewvos>
What do you guys map :nohlsearch to?
<andrewvos>
I followed Bernhardts advice and mapped <enter> to :nohlsearch and now I can't use CTRL+P properly. When I press enter on a file it does :nohlsearch
<andrewvos>
erikh: ^^
<andrewvos>
anyone: ^^
<bnagy>
I never set hlsearch
tjadc has joined #ruby-lang
s0ra_h is now known as sora_h
<rue>
andrewvos: §
<rue>
Alt-leftmost-button-in-number-row
srbartlett has quit [Remote host closed the connection]
dalekurt has joined #ruby-lang
Codif has joined #ruby-lang
ruurd has joined #ruby-lang
neoesque has quit [Quit: Bye!]
mark_locklear has joined #ruby-lang
neoesque has joined #ruby-lang
woollyams has quit [Quit: Computer has gone to sleep.]
neoesque has quit [Ping timeout: 248 seconds]
Raduwen has quit [Quit: Leaving...]
jxie has quit [Quit: leaving]
kyrylo has quit [Ping timeout: 252 seconds]
woollyams has joined #ruby-lang
Codif has quit [Remote host closed the connection]
kyrylo has joined #ruby-lang
kyrylo has quit [Changing host]
kyrylo has joined #ruby-lang
shtirlic has joined #ruby-lang
naz has quit [Read error: Connection reset by peer]
naz has joined #ruby-lang
tbuehlmann has quit []
workmad3 has joined #ruby-lang
shtirlic has quit [Read error: Connection reset by peer]
zmack has quit [Read error: Connection reset by peer]
solars has quit [Ping timeout: 245 seconds]
shtirlic has quit [Read error: Connection reset by peer]
<rue>
Mine is better
<rue>
§§§§§
shtirlic has joined #ruby-lang
<erikh>
heh
<erikh>
no, I just remember bernhardt recommending this complicated vim script to clean up swap files
<erikh>
he's .... not very familiar with vim
rippa has quit [Ping timeout: 244 seconds]
solars has joined #ruby-lang
rippa has joined #ruby-lang
<dominikh>
:D
tonesfrommars has joined #ruby-lang
soahccc is now known as soahccc`
eschwartz has quit [Remote host closed the connection]
Skif has joined #ruby-lang
L0rdShrek has joined #ruby-lang
qwerxy has joined #ruby-lang
postmodern has joined #ruby-lang
rippa has quit [Ping timeout: 246 seconds]
rippa has joined #ruby-lang
headius has joined #ruby-lang
rockpapergoat has quit [Read error: Connection reset by peer]
rockpapergoat has joined #ruby-lang
Boohbah has quit [Ping timeout: 276 seconds]
mrdtt has quit [Quit: Leaving]
Boohbah has joined #ruby-lang
A124 has quit [Read error: Connection reset by peer]
gsav has quit [Read error: Connection reset by peer]
gsav has joined #ruby-lang
solars has quit [Ping timeout: 252 seconds]
A124 has joined #ruby-lang
sei has quit [Quit: It's too late. You've awakened the gazebo. It catches and eats you.]
kvirani has joined #ruby-lang
ilyam has joined #ruby-lang
solars has joined #ruby-lang
kvirani has quit [Remote host closed the connection]
kvirani has joined #ruby-lang
benanne has joined #ruby-lang
eschwartz has joined #ruby-lang
aldto has joined #ruby-lang
Skif has quit [Ping timeout: 240 seconds]
<theoros>
so i've got an rvm installed ruby, and `rake foo` is acting like `bundle exec rake foo` except instead of a nice two line error message saying "run bundle install", i get a huge stacktrace
<theoros>
which isn't very friendly
<theoros>
and this happens before execution of the rakefile, so i can't rescue anything without hacking the rvm rake gem
<theoros>
any workaround?
aldto has quit [Quit: Leaving]
<hagebake>
it probably helps if you show the bcktrace
<theoros>
it's rubygems-bundler specific, i decided i should take it to #rvm instead
<outsmartin>
hello
<erikh>
hi
<rue>
HI THERE
<erikh>
BILLY MAYS HERE: HI
<rue>
HI BILLY MAYS
<imperator>
yo
qwerxy has quit [Quit: offski]
SimSala has quit [Ping timeout: 265 seconds]
workmad3 has joined #ruby-lang
Criztian has joined #ruby-lang
francisfish has quit [Remote host closed the connection]
SimSala has joined #ruby-lang
<rue>
Wait, *you’re* Billy Mays?
<erikh>
HE'S NOT LOUD ENOUGH
t has joined #ruby-lang
<rue>
MAYBE HE IS INCOGNITO AFTER FAKING HIS DEATH
<erikh>
OFF THE GRID
t is now known as Guest71151
<rue>
JUST OFF THE CAPS
<erikh>
I agree with this statement and would like to subscribe to your newsletter.
<imperator>
for some reason...this reminded me of the time tim bray said we should remove String#upcase and String#downcase
<singpolyma>
workmad3: using CGI lets you just drop files in a folder
msaffitz has quit [Quit: Computer has gone to sleep.]
workmad3 has quit [Ping timeout: 245 seconds]
banaan has joined #ruby-lang
<fragrant>
i can't understand how to map with port? normally i do for ruby on rails , 'rails s' and get a server running with port :3000, so how can i do something like that for standalone ruby file?
<RickHull>
the webserver decides what port to listen on
<RickHull>
so if your webserver lives in the one file, the port should be in there
<RickHull>
otherwise, if you webserver is outside the file, you'll need to configure the webserver
benanne has quit [Ping timeout: 248 seconds]
<deryl>
singpolyma: actually you may just drop files in a folder but the cgi is actually either being handed off to a binary (like a wrapped call to external perl OR trhough the mod_cgi / fastcgi) but the webserver has the associations for the files alrady determined. in this instance he doesn't want to have a webserver. he's tring to do it from ruby itself (even webrick should handle the associations iirc)
<singpolyma>
deryl: sure, that's fine. but if you wanted PHP-like "drop in a folder", CGI will give you that
<deryl>
unless you're using webrick or some other http server process, wouldn't you have to code in Net::HTTP or something similar to make it behave as a webserver? sounds/reads like he's trying to totally dismiss the use of a webserver and just feed a simple directory *like* a webserver
<deryl>
or i'm seriously misreading this (which i do often hehe)
<RickHull>
fragrant: here's an example of a webserver-in-a-file http://pastie.org/4075907 it serves up the directory from which it is run
<deryl>
singpolyma: ahh i get the point you're making. roger that
<RickHull>
just static files though, it does not run any code
fayimora has joined #ruby-lang
wallerdev has joined #ruby-lang
<fragrant>
what i'm trying to do is: i have a simple html form with username and email and submit button, type something there, click the button and it will run ruby script, that script will take the value from that form and print it on a new web page, like <form action="process.rb" method="post"> ...</form> , how can i run these on webbrick server? can anyone please pastebin the code for this, advance thanks and all
<fragrant>
answers are appreciated.
kain has quit [Quit: Sto andando via]
kain has joined #ruby-lang
<RickHull>
are you familiar with how to do this in rails?
<RickHull>
you just want to have a form, and the result page spits out the form values?
<RickHull>
the form can exist outside your server, or the server can serve it statically
mark_locklear has quit [Remote host closed the connection]
<RickHull>
the action needs to be a URL that your server responds to
<singpolyma>
I would use Rack instead of any server directly
<singpolyma>
rack can do cgi, webrick, all of them :)
<RickHull>
fragrant: keep in mind that there is no need to directly map a URL to a file on the filesystem. that's how static files are generally served, but for "active" URLs with dynamic responses, really you just want to map the relative URL to a "handler", which could be a method or a file or what have you
arooni-mobile has quit [Ping timeout: 265 seconds]
kvirani has joined #ruby-lang
carloslopes has quit [Quit: Leaving]
Carnage\ has quit []
<fragrant>
i can't understand how can i get the value from a html form post using ruby, can anyone pastebin ruby code to do it?
bglusman has quit [Remote host closed the connection]
cored has joined #ruby-lang
cored has quit [Changing host]
cored has joined #ruby-lang
RickHull has left #ruby-lang [#ruby-lang]
arooni-mobile has joined #ruby-lang
<fragrant>
can anyone pastebin ruby code to get data value from this simple html form? https://gist.github.com/2920100 , process.rb
rtl_ has quit [Ping timeout: 265 seconds]
<outsmartin>
fragrant: you could use sinatra to get a small layer of abstraction
<lianj>
require 'sinatra'; post '/process.rb' do; p params; end
<drbrain>
fragrant: 0.0.0.0 means "listen on all interfaces"
msaffitz has joined #ruby-lang
<deryl>
fragrant: dude, quit hitting every damned ruby channel back and forth will ya? they already asked you on the #ruby channel to tell them whats going on and to gist the code. sheesh
<fragrant>
WARN TCPServer Error: Address already in use - bind(2) for ruby -rrack -e 'Rack::Handler::WEBrick.run(proc{|env| p env }, :Port => 1024)'
<corsican>
I wasn't even clear on what he was asking
<fragrant>
may be because apache is running
<corsican>
netstat -anp | grep :1024
<fragrant>
nothing
<drbrain>
fragrant: you must choose a port > 1024
<drbrain>
and < 65536
<deryl>
actually he should be able to use 1024. can't use 0-1023 as they are root reserved. 1024 should be in userland though iirc
<deryl>
eg, 0-1023 he would have to be root to bind to it. 1024-65535 iirc is all userland
tbuehlmann has quit []
<drbrain>
deryl: ah, right
<fragrant>
same error, WARN TCPServer Error: Address already in use - bind(2) , it looks same error for all port
<fragrant>
may be problem somewhere else
Hakon|mbp has joined #ruby-lang
<drbrain>
fragrant: what does this say: ruby -rsocket -e 'p TCPServer.new(nil, 8000).addr'
<deryl>
wonder if its spawning 2 processes (master child) and the child is trying to bind to the same port the parent is on
<drbrain>
deryl: maybe rack isn't telling webrick not to listen
<deryl>
usually in master+worker(s) setup the master takes the inbound connection, steps the child a couple ports up or down and then connects the in/out, which after that they handle it on their own.
Hakon|mbp has quit [Read error: Connection reset by peer]
ruurd has quit [Read error: Connection reset by peer]
<deryl>
drbrain: possibly. but its working here on my mac
<deryl>
i just C&P'd his line
<fragrant>
gem list doesn't display webrick
<deryl>
i mean i get an error of course, when i connect but it binds at least. something in his env? :shrug:
<fragrant>
system libruby-webrick is not also installed
rmascarenhas has quit [Quit: leaving]
<fragrant>
it's rvm ruby
<deryl>
err? libruby-webrick isn't a dependency of rvm installed rubies at all
<drbrain>
ruby -rwebrick -e0
<deryl>
please oh please tell me you're not running the OS packaged ruby-rvm (dpkg -l | grep ruby-rvm)
Hakon|mbp has joined #ruby-lang
<drbrain>
fragrant: my above line should return with no error
<deryl>
if you are, apt-get --purge remove ruby-rvm and then visit rvm.io and install the actual rvm, not the busted package (that thing has been the bane of the project for months now)
<deryl>
and follow drbrain for everything else hehe
<drbrain>
fragrant: gem which webrick will show you where it is installed
<deryl>
if you have ruby-rvm in your pathing at all, then you're not running our rvm, you're running the distribution packaged rvm. (usually shows up in /usr/share/ruby-rvm/ and rvm is like /usr/bin/rvm the RVM project installs either in your $HOME or under /usr/local/rvm )
<deryl>
drbrain: sorry for tagging him on this at the same time, but it could be having an impact as well
<drbrain>
deryl: np
fayimora has quit [Quit: Busy…..zzzzz]
<drbrain>
fragrant: the documentation shows you how to create a webrick server and how to mount a proc (similar to the rubygems example I pasted earlier)
<fragrant>
drbrain: now , ruby runwebrick.rb => WARN TCPServer Error: Address already in use - bind(2)
<drbrain>
fragrant: did you return to the prompt?
<fragrant>
yes
<drbrain>
14:44 drbrain: fragrant: you're also missing "trap 'INT' do server.shutdown end" and "server.start" from [runwebrick.rb]
<fragrant>
drbrain: i can't understand how/what to do?
<drbrain>
you need to add those two lines to runwebrick.rb
mssola has quit [Quit: Konversation terminated!]
<frem>
is there a reason you're not using camping or sinatra?
<drbrain>
fragrant: the documentation says: "To run the server you will need to provide a suitable shutdown hook as starting the server blocks the current thread:"
<drbrain>
and then has those two lines
mistym has quit [Remote host closed the connection]
<fragrant>
what does that mean? are you telling me to make it 127.0.0.1 ?
dv310p3r has quit [Read error: Operation timed out]
<zenspider>
fragrant: for the love of ruby, open localhost:8000 in your browser or go away
brushbox has joined #ruby-lang
<drbrain>
fragrant: you can make it "127.0.0.1" (only bind to IPv4 localhost) or "0.0.0.0" (only bind to all IPv4 addresses, which is what you asked earlier)
<drbrain>
fragrant: do not edit webrick/config.rb, supply it along with :Port => 8000
<drbrain>
fragrant: but really, try it in your browser and tell us if it worked
axisys has joined #ruby-lang
<drbrain>
if it did not work then you have problems I don't know how to fix
<drbrain>
naquad: I had to port a markdown parser for rdoc because there weren't any that were extensible
cmaujean has joined #ruby-lang
<naquad>
i don't want to mess with regexp, but it seems the only choice
<drbrain>
naquad: what kind of extensibility do you need?
<rue>
NATURAL MARKDOWN ENHANCEMENT
<naquad>
drbrain, own syntax sugar for links and text formatting (a-la wikis [[]] and couple of block ones for mathml + diffs)
<drbrain>
naquad: you could add such things to RDoc's markdown parser, but it is not released yet
<zenspider>
naquad: I've been using kramdown and just preprocess my tweaks into their syntax
<zenspider>
but my extensions are minimal
<drbrain>
naquad: you'd have to write it as a Real Parser, of course
<naquad>
it seems i'll have to fork redcarpet :( which sux :( totally suxx
nuclearsandwich has quit [Read error: Connection reset by peer]
<drbrain>
naquad: yup ☹
jtoy has quit [Quit: jtoy]
kvirani has quit [Remote host closed the connection]
<fragrant>
someone please tell me how can i write process.rb so that after clicking the submit button it displays the username, https://gist.github.com/2920469
<fragrant>
i'm trying to writing ruby code to get the value from form, not customizing webrick server
<erikh>
use rails
<drbrain>
fragrant: the easiest way is to customize the webrick server
<drbrain>
fragrant: writing CGI is too hard
<fragrant>
is CGI the only option?
<drbrain>
no, CGI is the worst option
<drbrain>
customizing WEBrick is the easiest option
<fragrant>
what are the other options exceopt customizing WEBrick?
<drbrain>
fragrant: none that I'm willing to help you with
<drbrain>
you could use rails or sinatra or camping, but I am not familiar enough with any of those
<cmaujean>
fragrant: forget webrick and use a framework.
<cmaujean>
rails would be overkill for thatl, so take a look at sinatra or camping
<fragrant>
i asked that because finally i won't use webrick anymore, i will put those forms and ruby code inside /var/www/rproject configuring passenger, so working and customizing on webrick is not good idea
<fragrant>
drbrain: ^
<drbrain>
fragrant: then you'll need to get someone else to help you
<fragrant>
what are 'else' ?
<erikh>
fragrant: is english your native language? there are ruby channels in other ones.
<drbrain>
fragrant: I imagine if you're using passenger you'll need to use a different framework that I am not familiar with
<erikh>
might be easier to communicate with someone who speaks what you speak natively.
<drbrain>
fragrant: so I can't help you do this
<workmad3>
fragrant: haha, it looks like you're stepping back in time
<drbrain>
someone else here might be able to help you write that code
<erikh>
are we talking about sending the request or receiving it?
<fragrant>
recieving the request
<erikh>
ok
<erikh>
guides.rubyonrails.org
<fragrant>
getting the values from html form
<erikh>
as was mentioned prior
<erikh>
fwiw, you should really learn to help yourself when possible; mentorship is fine but it should go beyond the mundane bits (And this is rather mundane)
<erikh>
and that's all I have to add.
bglusman has quit [Remote host closed the connection]
imperator has quit [Quit: Leaving]
cjs226 has quit []
<fragrant>
https://gist.github.com/2920469 , clicking the submit button, i get error, "Method Not Allowed unsupported method `POST'. WEBrick/1.3.1 (Ruby/1.9.3/2012-04-20) at localhost:8000 "
<fragrant>
What should i do?
<cmaujean>
fragrant: you should read the documentation, thats what I did, and drbrain did, and zenspider did. We all read the docs and now we know how to do it. You should too, it's not only informative, but fun as well.
sepp2k1 has quit [Remote host closed the connection]
<fragrant>
cmaujean: ok, thank you, please give the link of docs you followed to post form and get the result/value from form using ruby
<fragrant>
i'm trying to do this using normal ruby , not using any framework
cored has joined #ruby-lang
cored has quit [Changing host]
cored has joined #ruby-lang
<dominikh>
well then waste your time, not ours :)
<cmaujean>
then you'll need to start at w3c.org and follow it up with several days reading on ruby-lang.org
<workmad3>
fragrant: why?
<lianj>
why? you talked about rack earlier, sinatra is just a thin layer on rack
gasbakid has quit [Remote host closed the connection]
<cmaujean>
and webrick is pretty much a framework too, so perhaps you should start by implementing your own http library, that would be the manly way to do it
<fragrant>
that is too simple and easy for php, you can get the value in this way for php, <?php echo $_POST["fname"]; ?> so i'm looking for something like this in ruby, there must be a way
<dominikh>
[ ] you understand programming
<fragrant>
looking for something like puts ??params[:username]
<dominikh>
then use PHP. this isn't PHP. this isn't some castrated web only scripting language
virunga has quit [Quit: Sto andando via]
enebo has quit [Quit: enebo]
<workmad3>
fragrant: there isn't something like that, because ruby doesn't revolve around just handling CGI scripts in a brain-dead manner
robotmay has quit [Remote host closed the connection]
<erikh>
actually there's the CGI library
<erikh>
but anyhow
<erikh>
the moral of the story here is that there is some reading to be done
<workmad3>
fragrant: your options are to use the CGI library to create a cgi script (bleh, and have fun working it out), use rack, or create your own interface to web servers and write the modules to get that interface supported
gregmoreno has quit [Ping timeout: 246 seconds]
gregmoreno has joined #ruby-lang
<fragrant>
why do i need to use rack? using CGI isn't enough?
<fragrant>
are you telling me to use rack + CGI ?
<workmad3>
no
<workmad3>
I said use CGI or use rack
<workmad3>
have fun if you use CGI
<fragrant>
ok
<fragrant>
either CGI or rack or own interface, right?
Natch| has quit [Read error: Connection reset by peer]
<workmad3>
fragrant: that's pretty much it, yes
Natch| has joined #ruby-lang
<fragrant>
Which one do you prefer?
banaan has quit [Quit: kbai]
<workmad3>
well, I consider CGI to be ancient, crufty and nasty, and I'm not in the market of creating apache and nginx modules to implement my own custom interfaces to ruby scripts... so work it out from that ;)