Skip to content

Instantly share code, notes, and snippets.

View SethDusek's full-sized avatar
🏠
Working from home

Kamal Ahmad SethDusek

🏠
Working from home
View GitHub Profile
Cannot find include dir(s) C:/xampp...
extconf.rb failed
C:\xampp\htdocs\dev-ruby\redmine>gem install mysql2 -- '--with-mysql-lib="C:/xam
pp/ruby/RailsInstaller/mysql/bin" --with-mysql-include="C:/xampp/ruby/RailsInsta
ller/mysql/include"'
Temporarily enhancing PATH to include DevKit...
Building native extensions. This could take a while...
ERROR: Error installing mysql2:
ERROR: Failed to build gem native extension.
C:/xampp/htdocs/xampp/ruby/RailsInstaller/Ruby1.9.3/bin/ruby.exe extconf
C:\xampp\htdocs\dev-ruby\redmine>gem install mysql2 -v '0.3.17'
Temporarily enhancing PATH to include DevKit...
Building native extensions. This could take a while...
ERROR: Error installing mysql2:
ERROR: Failed to build gem native extension.
C:/xampp/htdocs/xampp/ruby/RailsInstaller/Ruby1.9.3/bin/ruby.exe extconf
.rb
checking for ruby/thread.h... no
checking for rb_thread_blocking_region()... yes
C:\xampp\htdocs\dev-ruby\redmine>rails server
=> Booting WEBrick
=> Rails 3.2.19 application starting in development on http://0.0.0.0:3000
=> Call with -d to detach
=> Ctrl-C to shutdown server
Exiting
C:/xampp/htdocs/dev-ruby/redmine/config/initializers/secret_token.rb:7:in `<top
(required)>': uninitialized constant Redmine::Application (NameError)
from C:/xampp/htdocs/xampp/ruby/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1
C:\xampp\htdocs\dev-ruby\redmine>rails server
=> Booting WEBrick
=> Rails 3.2.19 application starting in development on http://0.0.0.0:3000
=> Call with -d to detach
=> Ctrl-C to shutdown server
Exiting
C:/xampp/htdocs/dev-ruby/redmine/config/initializers/secret_token.rb:7:in `<top
(required)>': uninitialized constant Redmine::Application (NameError)
from C:/xampp/htdocs/xampp/ruby/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1
@SethDusek
SethDusek / Not yielding?
Last active August 29, 2015 14:09
I moved to gist instead of pastebin because it very nice
c = coroutine.wrap(function()
for i = 1,40 do
print(i)
if getfenv(c).yield==true then
print("HELLOOO") coroutine.yield()
end
print(getfenv().yield)
wait(1)
end end)
c()
--sorry but this was done in the command bar so no spaces
function fun() for i = 1,40 do if yield==true then coroutine.yield() end print(i) wait(1) end end
fun = coroutine.wrap(fun)
fun()
rails server --binding=127.0.0.1
=> Booting WEBrick
=> Rails 3.2.19 application starting in development on http://127.0.0.1:3000
=> Call with -d to detach
=> Ctrl-C to shutdown server
[2014-11-22 11:50:16] INFO WEBrick 1.3.1
[2014-11-22 11:50:16] INFO ruby 1.9.3 (2014-02-24) [i386-mingw32]
[2014-11-22 11:50:16] INFO WEBrick::HTTPServer#start: pid=6508 port=3000
[2014-11-22 11:51:13] WARN Could not determine content-length of response body.
Set content-length of the response or set Response#chunked = true
#include <iostream>
#include "windows.h"
using namespace std;
int main() {
int n = 10;
while (n>0) {
n--;
cout << "\n" << n;
Sleep(100);
#include <iostream>
#include "windows.h"
using namespace std;
int main() {
int n = 10;
while (n>0) {
n--;
cout << "\n" << n;
Sleep(100);