ROR setup on ubuntu machine

This might help, This runs apache2, ruby on rails, and passenger

http://www.ajibanda.com/2010/12/install-ruby-on-rails-in-ubuntu-server.html

You won't need apache and passenger unless you want to run a
webserver. If you are just doing development and test on your pc then
they are not necessary.

Why is everybody top posting today?

Colin

Rvm is working with Ubuntu. Did that with 10.4 and 11.4

There were no problems at all, but read the hole setup manual and after that begin again and do what it says. You must be sure to have all requirements and it would help if you know what you are doing:)

Someone asked because topposting, I can only answer for me but I am using android email client that does not support inline quoting…

thanks for the responds… also i have ubuntu 11.04.

my email ID is vgrkrishnan@gmail.com

I am a total newbie.. after messing with cygwin and minw in windows i
installed ubuntu 11.04 on my laptop and did a lot of googling..

installed twice to get it to where it is (right? we'll see) but am
using rvm.. it wasn't that hard and went smoothly... there are some
specific install sites on the web that discus ruby, rails, rvm and
ubuntu. i don't have them handy but if i can find them anyone can :slight_smile:

good luck!

This is a very good tutorial.

http://ryanbigg.com/2010/12/ubuntu-ruby-rvm-rails-and-you/

Hope it helps!

after all my system have ruby 1.8.7 (2010-06-23 patchlevel 299) [i686-linux], Rails 2.3.5, gems 1.3.7

but i cannot proceed from this stage, for creating a simple application…

how to solve this? can i reinstall the ubuntu

Thank u
amvis

Why not?

Here are two tutorials which may help (video included):
http://www.rubyinside.com/how-to-install-ruby-1-9-2-and-rails-3-0-on-ubuntu-10-10-4148.html

http://ryanbigg.com/2010/12/ubuntu-ruby-rvm-rails-and-you/

Both are using latest Ruby and Rails on Ubuntu 10.10 (which works for Ubuntu 11.04 too).

Mircea

i followed this http://www.ruby-lang.org/en/documentation/quickstart/3/, and setup all the stuffs.
After i created a new rails application, when i create a database i got one error like
cyberpro@ubuntu:~/blog$ rake db:create
rake aborted!
Could not find a JavaScript runtime. See https://github.com/sstephenson/execjs for a list of available runtimes.
(See full trace by running task with --trace)

Try this:

Thanks for the response. i think this question, which am going to put here, is a bad question, anyway
when i start the server
cyberpro@ubuntu:~/blog$ rails server
/home/cyberpro/.rvm/gems/ruby-1.9.2-p290/gems/rack-1.3.4/lib/rack/backports/uri/common_192.rb:53: warning: already initialized constant WFKV_
=> Booting WEBrick
=> Rails 3.1.1 application starting in development on http://0.0.0.0:3000
=> Call with -d to detach
=> Ctrl-C to shutdown server
[2011-10-12 15:15:12] INFO WEBrick 1.3.1
[2011-10-12 15:15:12] INFO ruby 1.9.2 (2011-07-09) [i686-linux]
[2011-10-12 15:15:12] INFO WEBrick::HTTPServer#start: pid=9007 port=3000
my question is, how to move to the db creation ? i mean how to stop this. can i use this Call with -d to detach
=> Ctrl-C to shutdown server
and continue…

Am sorry for asking this type of question

Couldn't disagree more. RVM actually makes like a lot easier for
beginners IMO. The install is simple and easy (just run the script)
and works perfectly fine on pretty much any version of Ubuntu.

Using RVM allows beginners to tinker with various versions of Ruby in
a non-traumatic way and keeps each project in its own gemset to avoid
version conflicts and issues with dependencies. Once installed
correctly, with wrappers in place, it works identical to native ruby
only you don't have to "sudo" so much.

It's a great place to both start and finish as a ruby developer. I run
RVM locally and in production and I advise all the newbies I help out
to do the same. Particularly on an OS X dev environment, native ruby
is a pain and RVM alleviates most of those pain points.

Work through some tutorials that will show you the basics of Rails.
railstutorial.org is good and is free to use online. Then you will
look back on the questions you are asking and not believe that you had
to ask them :slight_smile:

Also look at the Rails Guides.

Colin

If you want to stop WEBrick server then use CTRL+C (if that doesn’t work try CTRL+Z).

OR, you can open another terminal window and work there to create your database (I recommend that).

Mircea

Thanks all, thanks mg1313

Advanced thanks to all, for given some important links, which help me a lot, to start the ROR from scratch. After all the set-up, I have created one page. so next i need to integrate a simple application with twitter. Simple application means when i write something in a text box and click the button, that will update into my twitter account. for that i have to use the twitter apis
for the authentication purpose, i have got the token from twitter. But i have some confusing how to use it, And also this rails basically going with MVC. so where the code will write? and so on…
I knw the MODEL is basically connection with the database, and the VIEW for the presentation. and finally the CONTROLLER have the main function part. But where will write the code for each one? If have any mistake in my understand, plz specify the issues?

also i got some link about dis
http://pedromtavares.wordpress.com/2010/06/21/integrating-rails-with-twitter/

Thanks
Vishnu

Have you worked right through some tutorials such as
railstutorial.org? This will answer most of these questions.

Colin

+1

Dan Nachbar

rvm > apt

I really like using rvm for different gemsets. When you want to test
out the latest version of rails for 1 project it makes life so much
easier. apt and rvm have declared a delicate truce on my machine. I
basically use apt for system wide packages and rvm for ruby and rails
so that I can have different versions on different projects.

I followed this link for integrate with twittter
http://cbpowell.wordpress.com/2011/03/17/twitter-oauth-and-ruby-on-rails-integrated-cookbook-style-in-the-console-updated-for-twitter-1-0/
but when i give this in console i got the error like this

client = Twitter::Client.new
#<Twitter::Client:0x971a79c @adapter=:net_http, @consumer_key=nil, @consumer_secret=nil, @endpoint=“https://api.twitter.com/”, @format=:json, @gateway=nil, @oauth_token=nil, @oauth_token_secret=nil, @proxy=nil, @search_endpoint=“https://search.twitter.com/”, @user_agent=“Twitter Ruby Gem 1.7.2”, @media_endpoint=“https://upload.twitter.com/”, @faraday_options={}>
>client.update(‘Test post from the console’)

Twitter::Unauthorized: POST https://api.twitter.com/1/statuses/update.json: 401: Could not authenticate you.
from /home/cyberpro/.rvm/gems/ruby-1.9.2-p290/gems/twitter-1.7.2/lib/faraday/response/raise_http_4xx.rb:12:in on_complete' from /home/cyberpro/.rvm/gems/ruby-1.9.2-p290/gems/faraday-0.7.5/lib/faraday/response.rb:9:in block in call’
from /home/cyberpro/.rvm/gems/ruby-1.9.2-p290/gems/faraday-0.7.5/lib/faraday/response.rb:62:in on_complete' from /home/cyberpro/.rvm/gems/ruby-1.9.2-p290/gems/faraday-0.7.5/lib/faraday/response.rb:8:in call’
from /home/cyberpro/.rvm/gems/ruby-1.9.2-p290/gems/faraday-0.7.5/lib/faraday/request/url_encoded.rb:14:in call' from /home/cyberpro/.rvm/gems/ruby-1.9.2-p290/gems/faraday-0.7.5/lib/faraday/request/multipart.rb:13:in call’
from /home/cyberpro/.rvm/gems/ruby-1.9.2-p290/gems/twitter-1.7.2/lib/faraday/request/multipart_with_file.rb:18:in call' from /home/cyberpro/.rvm/gems/ruby-1.9.2-p290/gems/faraday-0.7.5/lib/faraday/connection.rb:207:in run_request’
from /home/cyberpro/.rvm/gems/ruby-1.9.2-p290/gems/faraday-0.7.5/lib/faraday/connection.rb:94:in post' from /home/cyberpro/.rvm/gems/ruby-1.9.2-p290/gems/twitter-1.7.2/lib/twitter/request.rb:27:in request’
from /home/cyberpro/.rvm/gems/ruby-1.9.2-p290/gems/twitter-1.7.2/lib/twitter/request.rb:10:in post' from /home/cyberpro/.rvm/gems/ruby-1.9.2-p290/gems/twitter-1.7.2/lib/twitter/client/tweets.rb:45:in update’
from (irb):23
from /home/cyberpro/.rvm/gems/ruby-1.9.2-p290/gems/railties-3.1.1/lib/rails/commands/console.rb:45:in start' from /home/cyberpro/.rvm/gems/ruby-1.9.2-p290/gems/railties-3.1.1/lib/rails/commands/console.rb:8:in start’
from /home/cyberpro/.rvm/gems/ruby-1.9.2-p290/gems/railties-3.1.1/lib/rails/commands.rb:40:in <top (required)>' from script/rails:6:in require’