Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 8 years ago.
Improve this question
I'm new to Ruby and want to write a web service using Ruby. Some constraints are:
Ruby 1.8.7
Windows 2008 Server
I found that the Sinatra gem may help. I want to know if there are any other options beside Sinatra.
Sinatra is a very easy-to-use way to go, and what I'd recommend to get your feet wet.
There are other solutions:
Padrino is built on-top of Sinatra, and offers additional functionality, but for your purposes Sinatra is still a more easily accessible way to go as you'll spend less time configuring.
Rails is the heavy-weight solution for Ruby, but if you are just learning the language then I'd recommend Sinatra still. Rails is very powerful but a lot of things it does will seem like magic, though they are actually based on standard Ruby features. So, I think you are still better off learning Ruby and working with Sinatra to get the basics.
Related
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 1 year ago.
Improve this question
I have following concern:
I should creat a application for a documentation tool (Tex/Word files to a final PDF). This tool requires a GUI and I would really love to write it in my fav programming lang Ruby.
The main problem while asking my friend google was: every question was asked 3+ years ago and/or the libraries are outdated.
So is there a nice way to get a GUI with Ruby on Mac/Linux and Windows (it would not bother me to create two different interfaces). Or are some better solutions out there (please no .java)
(Ruby on Rails could be a solution, but only browserbased ...)
Would be happy for your Ideas and Solutions :)
Best Regards
bMalum
I grepped #ruby channel logs and found that people often recommend Shoes framework for Ruby GUI apps.
Since Shoes makes use of JRuby, it requires Java to run. It shouldn't be a problem if your software is intended for regular people, as Java is installed on most computers anyway.
GitHub: https://github.com/shoes/shoes4
Some tutorial: http://pragtob.wordpress.com/2013/07/17/shoes-4-a-progress-report/
While there are some Ruby solutions for GUI, I would go for writing a Rails Web application and wrapping it with node-webkit instead. You will have a separate window for the application so it's kind of a native app, not a webapp. ;)
Please note you will need to bundle both node.js and Ruby binaries for the platforms you want to support. The most popular approach for node-webkit wrapped apps is AngularJS - then you don't have to bundle Ruby.
I have created a Gem LibUI for creating small GUI tools in Ruby. You can try it out if you like.
https://github.com/kojix2/libui
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 9 years ago.
Improve this question
I've read the tutorial but most are running rails guides on the web ?. I do not know how to run ruby on the web. help me !
You want to run it as CGI? Or running inside a wrapper? It really sounds like you don't have a good starting knowledge. I'd STRONGLY recommend taking time to learn more about all the technologies needed, such as how browsers interpret HTML, how back-end systems send HTML, plus serve images, CSS and JavaScript.
Start with Ruby and Sinatra, then grow from there:
require 'sinatra'
get '/hi' do
"Hello World!"
end
Load the Sinatra gem into your Ruby environment using gem install sinatra. Save the above code to a file, then run it using ruby /path/to/your/saved/file.rb. Follow the directions it outputs.
Ruby, unlike PHP, was not built with web in mind. It was made as a general programming language that can run just about anywhere. So you can't just boot up Apache and run Ruby code.
With that said, it is still possible to run your own Ruby code online. All you would need to do is write a web server that can listen and translate your code to something that is view-able from a web browser.
I would suggest not creating your own as there are a number of services built. If you are looking for something to put your Ruby code online, but don't want something as large as rails, I would suggest using Sinatra.
Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 8 years ago.
Improve this question
Appreciate some guidance - I'm trying to learn how to build HTML5 web-apps with an example:a simple Craigslist-like app that allows people to post as well as view items for sale using Web as well as mobile. Here's the tool-set I have in mind.
GUI: Sencha Touch
Server-side code: Java (should I be using Ruby or Python?)
Database: MySQL
Hosting: AWS
Other: PhoneGap to use camera function for image/video upload
Do you have any comments or suggestions on the above tool-set?
Don't use AWS directly unless you are very familiar with it. Try heroku. You can deploy java, python, ruby or pretty much anything with a simple git push. You don't have to worry about setting up servers and a basic account is free. You will wanting to be using Postgresql rather than MySQL with heroku as that is their standard database.
Ruby Rails can be a bit heavy upfront. Maybe look at Sinatra which has a slightly less steep learning curve.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 8 years ago.
Improve this question
ORMs, HTML Templates, URL mappers? I'm new to Ruby and I'm wondering what other options are there for web development other than Rails.
Maybe sinatra?
You can get some information on these and many other topics at Ruby Toolbox:
Web App Frameworks
Template Languages
I'm not sure what "URL mappers" in your question refers to, however.
I would like to recommend Padrino. It's an easy framework to get started with, and the documentation is great.
Cut from the Padrino webpage:
Padrino is a ruby framework built upon the excellent Sinatra Microframework. Sinatra is a DSL for quickly creating simple web applications in Ruby. Padrino was created to make it fun and easy to code more advanced web applications while still adhering to the spirit that makes Sinatra great!
Would Watir count? 10 Alternative Ruby Web Frameworks has a list of other possibilities to explore.
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 4 years ago.
Improve this question
I have a web application written mostly in Java. There are a few users that hope to use ruby to tailor this application to suit their own needs. How would I write an API that allows Ruby developers to interact with my application?
I'm really looking for some direction here - I know it's a broad question..
I think rmk has the right idea here, but I think rails is overkill. You've really got two feasible options:
The first option would be to leverage JRuby to allow them to provide JRE classes that you can interface with your code. They can write classes in ruby, compile them with JRuby, and you can deploy them with your app.
The other viable option would be to create a restful API using your existing java codebase and let them consume your api from ruby, much like rmk suggests. If you're providing a restful api, there's no need to add the overhead of jruby and rails unless you have some desire to.
You could write up a simple web service using JRuby + Rails.
Learn more about JRuby here: http://jruby.org/
The main advantage of using JRuby is that you will be able to leverage your existing Java code. The main advantage of using Ruby on Rails is that developing a web service will be a painless, even pleasurable experience.
And if you design your API in a RESTful manner, you can have Ruby programmers consume your API using ActiveResource
Resources:
Quick intro to JRuby on Rails: 120 second guide.
Great book if you want to get started: Ola Bini's Book