botanicus / rango

Rango is ultralightweight, ultracustomizable, ultracool web framework inspired by Django.
http://101ideas.cz
MIT License
221 stars 9 forks source link

server starting problem #130

Closed millisami closed 14 years ago

millisami commented 14 years ago

I've installed rango, created the sample tutorial project and tried to run

./config.ru

but the output is

bash: ./config.ru: ./init.rb: bad interpreter: No such file or directory

What went wrong? I'm running on Jaunty!

botanicus commented 14 years ago

It's not a bug, just Linux version of /usr/bin/env can't handle CLI args, change /usr/bin/env ./init.rb to ./init.rb + you'll have to change shebang in init.rb in the same way.

I'll write about it to a wiki.

millisami commented 14 years ago

I didn't get what you suggested. My config.ru looks like:

!./init.rb -p 4000 -s thin

encoding: utf-8

... and init.rb as:

!\ruby --disable-gems

encoding: utf-8

... So, there ain't any /usr/bin/env ./init.rb and I'm confused what to replace? And FYI I'm using rvm on jaunty ubuntu.

botanicus commented 14 years ago

OK, I was trying it on Linux and it works just with full path to ruby executable, so just change your shebang in init.rb to #!/usr/bin/ruby --disable-gems or so. I'll try to find better solution, something more robust, probably replacement for /usr/bin/env which will behave in the same way on all the platforms (well, except Windows) and will play well with rvm.

millisami commented 14 years ago

Well, this still doesn't work for me. coz /usr/bin/ruby -v returns my default rvm ruby 1.8.7 and when i switch to rvm 1.9.1 and issue command /usr/bin/ruby -v, it still shows the 1.8.7 ruby I think I'll give up until this is fixed.

botanicus commented 14 years ago

From my last message: * I'll try to find better solution, something more robust, probably replacement for /usr/bin/env which will behave in the same way on all the platforms (well, except Windows) and **will play well with rvm***

So yes, it doesn't work with RVM as I told. However this isn't any problem, just point your shebang to correct Ruby, that's it!