I am learning and have already set up a Ruby on Rails environment based on Hartl's book. I would also like to set up a Rhodes environment for mobile app development.
How would I set up Rhodes after having set up Ruby on Rails, without messing up my Ruby on Rails environment? Also, will I still need RhoSync if I have SQLite3 (or MySQL) with WEBrick (or Apache)?
I am running Ubuntu 11.04 (I will use RhoHub for the compiles)
NOTE: I have found these instructions on the Ubuntu Forum but they are not exactly what I'm looking for, as I am using ruby with RVM
Any help would be greatly appreciated.
After much searching and reading the Rhomobile book that was just released, if you have a Ruby on Rails environment, all you need to do is:
install the "Rhodes" gem
install the "Rhosync" gem
the SDK of the phone you wish to develop for (this also depends on your dev machine)
RhoSync is a server on the phone which talks to whatever backend you need, whether it is your own server/DB or another like Heroku (the book gives a Heroku example). This means your DB and Server are not an issue.
A friendly note to all, I am a beginner so I could stand under correction. I only answered with my findings as not many people had answered this questions, so I assumed not many people knew the answer.
Hope this helps other beginners, and feel free to correct my findings if it's needed.
Related
I have been doing some searching with ruby on rails but there is one thing I don't quite understand reading about it? What exactly is the difference between app and core development? Is core development improving upon rails while apps are for website creation? Any explanation on the difference would be useful. Thank you!
Yes. :)
If you're seeing "Rails Core" or "Rails Core Contributor" or the like, that's referring to development of Rails itself.
Rails apps are for app/site creation, as you stated.
(Though if you are in the app-building business, it is both useful and educational to pay attention to development of the framework itself.)
You hit it right on the head there. Contributing to "rails core" means that you're adding on to the rails gem itself (https://github.com/rails/rails). Rails app development means that you've simply used rails to develop your own applications (e.g. rails new myapp and so on).
Core development is for the development of rails itself, as stated above. I am looking to setup a Rails application development environment. I am looking for a vagrant box for a good virtual machine environment. I found one here; however, it describes that the "VM is not designed for Rails application development, only Rails core development." This distinction is important to know.
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
I understand Rails is a web framework built on Ruby. Ruby is a language separate from Rails which Rails uses. I'm not getting if it is best to use both separately or it is best to use Ruby on Rails.
Or is Ruby on Rails a completely different framework just using Ruby code and Rails code? Could you just install both Ruby and Rails and set them both up together?
If the above is true then what is Ruby on Rails and the benefits of using it in comparison to setting up Ruby and Rails as one?
RUBY => programming language
RUBY ON RAILS => web framework written in ruby
ROR / RAILS => shortcut for RUBY ON RAILS
is this still confusing?
The name "Ruby on Rails" is sometimes shortened as "Rails", or "RoR", which is the same - a web development framework.
You can, of course, use Ruby without Rails, as you can use any other programming language, to build different programs, not only web applications.
You cannot use Rails without using Ruby, because as you wrote yourself, Rails is a web framework built in Ruby. When you build web applications in Rails, you write your code in the Ruby language (there are some other rewrites of Rails, like GRails, which uses Groovy, but this is a different thing).
If you follow the installation guide on the Get Started page, you will see that you first install Ruby for your platform, then install RubyGems (which is a package manager for installing additional Ruby libraries), and then use RubyGems gem install rails command to install Rails with all its dependencies. So you might say that Rails is a library for Ruby.
This installation of Rails then provides a set of scripts, including the rails command, which help you build your web application according to the set of conventions adopted by Rails.
From http://guides.rubyonrails.org/getting_started.html:
Rails is a web application framework running on the Ruby programming language.
I highly recommend making your way through this guide.
Well, it seems many people don't know Ruby but they know Rails. Just as much as I know how to use JQuery without actually understanding JavaScript. So you're not completely off the trail asking this question :)
But honestly, it's not much fun just doing Rails without understanding Ruby. As soon as you understand Ruby you will see more to it than just Rails.
I'd recommend you get familiar with Ruby first and then see if you like the language. If you do you can go further and try Rails as well. If Ruby doesn't suit your language tastes try a different language like Java or Erlang or Python (whatever, doesn't really matter and - as always- depends on the problem you're trying to solve).
If you like Ruby you will also soon learn that there are other nice web frameworks like Sinatra that are a lot smaller and might fit your needs a lot better. Again, it depends on your needs.
Read up on some of the languages, mostly their web sites offer some insight into what they are like and what they are good for. Check http://ruby-lang.org for Ruby!
Ruby is an a language, and Ruby on Rails is an a webframework. It is more like C# and ASP.NET, Python and Django or Java and Spring. So everything what is possible with Ruby is posible with Rails and the other way, everything what is possible in Rails is possible in Ruby, but it can be harder, longer or less clear than using RoR.
Ruby on Rails is web development framework built using Ruby. So it borrows the syntax and some functionality. Ruby is programming language and it is not specific to domain. Ruby can be used in more than one domain. If you want to develop a web app you need to use Ruby on Rails. There are many web frameworks built on Ruby.
For knowing Rails you need to know basics of Ruby. So better to start Ruby first. Once you get the basics you can learn both parallel.
For Ruby refer: http://www.ruby-doc.org/docs/ProgrammingRuby/
For RoR refer: http://guides.rubyonrails.org/getting_started.html
Use RVM (Ruby Version Manager): to install. Link: https://rvm.io/rvm/install/
What is the best way to get familiar with the heroku environment? What are the first steps? I want to start programming with it next week, using Ruby on Rails.
If you want to get started on ruby on rails using Heroku one of the best things you can do is actually work through the Rails tutorial. It is designed and written with Heroku (and Git which you will be using to deploy) in mind. You can check it out at http://ruby.railstutorial.org/ruby-on-rails-tutorial-book.
I don't know if you already know Ruby or not, but the tutorial is designed in such a way that you don't actually need to know Ruby to follow it.
One very nice thing (among many) about Heroku is that they maintain solid documentation. Specifically for your question, you should start with Getting Started with Heroku.
I see a lot of people asking about Blog Engines, but most of the questions & answers are rather old. Or if they aren't old most of the projects are old. I'm wondering if anyone knows of any Blog Engines that currently support Rails 3.1 or are at least being actively developed to support Rails 3.1.
I would also be interested in seeing any sample applications or blog posts written for Rails 3.1 Blogs. I am going to be adding a blog to one of my websites, and would prefer to simply use a Rails Engine or sample code if there are any good ones out there. I hate reinventing the wheel. Looking for something simple, and not too opinionated so I can modify easily to suit my own needs.
you might want to check out Refinery http://refinerycms.com/engines
doesn't look like they are 3.1 yet, but probably soon
https://github.com/resolve/refinerycms-blog
Your best bet would probably be to use Typo.
Typo is currently using rails 3.0.9. Rails 3.1.0 is still a release candidate so I don't know of any blogging apps using it right now. If you must use rails 3.1.0 then you may have luck grabbing the gem for 3.1.0.rc4 (the newest version) and using typo anyway. Chances are everything will still work.
Hope this helps.
Perhaps Enki is a good fit, currently at Rails 3.0 but there is a github branch with Rails 3.1 support.
http://www.enkiblog.com/
Interestingly BrowserCMS was recently made to be a mountable engine: https://github.com/browsermedia/browsercms/commit/6098699fed2e3dbd65815ac3a5ce0dd6acc103d2
Seem to have a bit of time and experience behind them. More akin to Concrete5 with an inline front end / in context editing facility for users, which can be a real plus.
Im looking into this now and Im getting to conclusion that the best way to do this would be mounting a rack-app(like sinatra) into your rails app, there's various basic sinatra blogs in github to start or copy, not to mention this is fully customizable and I guess very light-weight.. engines will likely have dependencies and may also break when updating gems, a rack app won`t
I wasn't able to find any satisfying solution with engines
other stuff I found:
mounting a rails app inside a rails app: http://blog.dynamic50.com/2010/02/22/rails-3-0-mount-multiple-apps-as-engines/ feels a bit weird(heavy?), but you could mount a fully featured app like enki...
http://planscope.io/blog/2012/03/08/mounting-a-blog-within-a-rails-3-application/ this blogpost talks about using Toto, it seems pretty nice, easy and simple... but the project is not being maintained and it doesn't seem to be able to support a lot of features...
I dunno about using git to post, it makes it really simple but I dunno if I'd like having non-code stuff in my commits
Monologue https://github.com/jipiboily/monologue . From their web:
It is a barebone blog engine for Rails. It is built as a Rails engine and with a focus on keeping very few dependencies to ease it's use in your project. You can also use monologue-markdown which will replace the default editor with a simple Markdown editor.
Seems like pretty active development also.
What Rack enabled blogging engines exist? I want to deploy a free blog to heroku and need more customizabilty than the free hosting of Wordpress.com or Blogerty provide.
Also in another note, has anyone tried to port Wordpress to Ruby?
In any special order:
== Rack based
toto
ruby-slippers based on toto
== Jekyll based
Jekyll itself
Octopress blogging in jekyll
spinto jekyll cms
prose jekyll cms
== Rails based
typo one of the oldest in active, with more features but more complex
enki for hackers, basic code
simplelog just main features
mephisto not developed anymore
radiant generic CMS
== Rails engines
refinerycms generic CMS
refinerycms-blog blog engine that integrates with refinerycms
blogit
ComfortableMexicanSofa generic CMS
comfy-blog blog engine that integrates with ComfortableMexicanSofa
Monologue: minimalistic blog engine with very few dependencies.
squeaky
hitchens
kublog
jabe
locomotivecms generic cms
BrowserCMS generic CMS
== Integrate jekyll with Rails
bloggy
If you're a fan of git, you might try Jekyll. It is a static site generator which allows you to do some templating. You don't need a database which makes running it on Heroku even easier.
It's been awhile since I looked into this, but I believe the two major Ruby blog applications are still Mephisto and Typo. They've both been around awhile and appear to still be maintained.
As Heroku has a read-only file system, you may need to do some tweaking to get them to work. Here's a blog post on getting Typo running on Heroku.
You may also want to take a look at Radiant, which is more of a traditional CMS system, but can be used for blogging. There's actually a tutorial on the Heroku blog about getting it up and running on their platform.
Finally, if you want something a bit more lightweight but with full CSS control you may want to take a look at Scanty. It might require you go get your hands dirty, but seems to run great on Heroku. In fact, it's written by one of the founders.
If you want a nice, hackable pure ruby & rack blog: RubySlippers
It used git to manage versioning of your posts and publishing as well. It is built to get a free blog going on heroku in record time!
~end shameless plug
I recently created a platform called Stipes.
It's based on Sinatra and it is very light in terms of required resources.
I installed it on a Raspberry PI recently, for internal, single-user, usage and it works very well. I'm still working on it and any support is welcomed.
If you are not into installing a fully fledged blogging engine, Bloggity may fit your needs, in fact you can use to add a blog to whatever app you may have.