Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Building ngx in more standard way #135

Closed
kbrock opened this issue Aug 21, 2015 · 6 comments
Closed

Building ngx in more standard way #135

kbrock opened this issue Aug 21, 2015 · 6 comments

Comments

@kbrock
Copy link
Contributor

kbrock commented Aug 21, 2015

Hello,

I like how well ngx_mruby did in the benchmark comparisons with other servers. I also feel being the fastest ruby (by far) is very cool, too.

Unfortunately the procedure for building ngx_mruby is a little intimidating for me. ( setup )
I need to add merb for templating and possibly a database connection pool, but feel the current way I built it is a little hacky.

Do you have comments for the following improvements?

  1. I can build mruby with rvm/ruby-install/ruby-build. Can I just link that while building ngx_mruby using something like -I/home/mruby/lib/mruby.a -lmruby? Do we really need to download mruby inside of ngx_mruby source?
  2. Do I need to rebuild mruby for every gem, or can I just add the gem in a similar way mentioned above -lmruby-merb?
  3. Can I build ngx using their module syntax like cd ngx ; ./configure --add-module=$HOME/ngx_mruby See install notes

I'm very happy to do the work, just hope you would have pointers to what is possible, and what path you would like me to take.

Thank you,
Keenan

@matsumotory
Copy link
Owner

Thank you for your suggestion. Please let me consider about this issue.

@kbrock
Copy link
Contributor Author

kbrock commented Oct 2, 2015

I think the issue is probably my lack of understanding.

Do you have a suggestion on how I can change the install of mysql? benchmarks. And how I would then add the merb gem?

I really want to add the remaining benchmark tests so ngx_mruby can shine across the board.

@matsumotory
Copy link
Owner

@kbrock

Thank you for the question. When you want to add other mrbgem to ngx_mruby, you can add the following code into ngx_mruby/build_config.rb;

conf.gem :github => "mattn/mruby-mysql"
conf.gem :github => "pbosetti/mruby-merb"

@scalp42
Copy link

scalp42 commented Dec 11, 2015

@kbrock did you figure the answer to these questions by any chance ? Would come in handy as I'm having the same questions 😄

cc @matsumoto-r

@yyamano
Copy link
Collaborator

yyamano commented Dec 27, 2016

We need to change mruby/mrbgem build system to support such features. And rvm/ruby-install/ruby-build too. They are for binary installation like mruby command, not for embedding mruby into applications. It's a lot of work.

@kbrock @scalp42 Could you explain specific problems with current ngx_mruby build process?
Downloading mruby source many times? Rebuilding mruby every time you add a new gem? Or something else?

@yyamano
Copy link
Collaborator

yyamano commented Apr 7, 2017

No feedback for over three months. Please feel free to reopen it if necessary.

@yyamano yyamano closed this as completed Apr 7, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants