WEBrick server

67 views
Skip to first unread message

Naresh Jilla

unread,
Dec 11, 2015, 6:56:14 AM12/11/15
to rubyonra...@googlegroups.com
hi all,
How to install WEBrick server in ubuntu14.0

--
Posted via http://www.ruby-forum.com/.

Kanna Vrk

unread,
Dec 11, 2015, 7:28:51 AM12/11/15
to rubyonra...@googlegroups.com
Hi,

No need to install WEBrick, it will inside Ubuntu package.

Thanks.


Thanks & Regards,
Kanna

 

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-ta...@googlegroups.com.
To post to this group, send email to rubyonra...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/b6f74d69891e9c1f013264a6eb8df2d2%40ruby-forum.com.
For more options, visit https://groups.google.com/d/optout.

Colin Law

unread,
Dec 11, 2015, 8:31:40 AM12/11/15
to Ruby on Rails: Talk
On 11 December 2015 at 10:25, Naresh Jilla <li...@ruby-forum.com> wrote:
> hi all,
> How to install WEBrick server in ubuntu14.0

There is no Ubuntu 14.0, perhaps you mean 14.04.

What exactly are you trying to do? Do you mean that you want it to be
used when you run rails s? If so then which version of rails are you
using?

Colin

Naresh Jilla

unread,
Dec 12, 2015, 3:27:35 AM12/12/15
to rubyonra...@googlegroups.com
Colin Law wrote in post #1179830:
Hi Colin,

my rails version is 4.0.2,ruby version is 1.9.3p484 and i am trying to
design login page but when i try to start rails server following is
message coming and i am not able open on the browser by localhost
because it doesnot display any port number

guest-QI1NUN@bitstack-vindhya:~$ rails s
Usage:
rails new APP_PATH [options]

Options:
-r, [--ruby=PATH] # Path to the Ruby binary of your
choice
# Default: /usr/bin/ruby
-m, [--template=TEMPLATE] # Path to some application template
(can be a filesystem path or URL)
[--skip-gemfile] # Don't create a Gemfile
-B, [--skip-bundle] # Don't run bundle install
-G, [--skip-git] # Skip .gitignore file
[--skip-keeps] # Skip source control .keep files
-O, [--skip-active-record] # Skip Active Record files
-S, [--skip-sprockets] # Skip Sprockets files
-d, [--database=DATABASE] # Preconfigure for selected database
(options:
mysql/oracle/postgresql/sqlite3/frontbase/ibm_db/sqlserver/jdbcmysql/jdbcsqlite3/jdbcpostgresql/jdbc)
# Default: sqlite3
-j, [--javascript=JAVASCRIPT] # Preconfigure for selected JavaScript
library
# Default: jquery
-J, [--skip-javascript] # Skip JavaScript files
[--dev] # Setup the application with Gemfile
pointing to your Rails checkout
[--edge] # Setup the application with Gemfile
pointing to Rails repository
-T, [--skip-test-unit] # Skip Test::Unit files
[--rc=RC] # Path to file containing extra
configuration options for rails command
[--no-rc] # Skip loading of extra configuration
options from .railsrc file

Runtime options:
-f, [--force] # Overwrite files that already exist
-p, [--pretend] # Run but do not make any changes
-q, [--quiet] # Suppress status output
-s, [--skip] # Skip files that already exist

Rails options:
-h, [--help] # Show this help message and quit
-v, [--version] # Show Rails version number and quit

Description:
The 'rails new' command creates a new Rails application with a
default
directory structure and configuration at the path you specify.

You can specify extra command-line arguments to be used every time
'rails new' runs in the .railsrc configuration file in your home
directory.

Note that the arguments specified in the .railsrc file don't affect
the
defaults values shown above in this help message.

Example:
rails new ~/Code/Ruby/weblog

This generates a skeletal Rails installation in ~/Code/Ruby/weblog.
See the README in the newly created application to get going.

Sai Ch

unread,
Dec 12, 2015, 3:27:35 AM12/12/15
to rubyonra...@googlegroups.com
@Naresh Jilla,

You need to change directory to app like below

1. create new rails app with command:
rails new app_name

2. then cd to directory the command is:

cd app_name

3. then bundle update

bundle install

4. modify db config file in config directory

rake db:create db:migrate

5. then start server

rails s

so, keep in mind it is very basic common commands to run rails app in
machine.

Colin Law

unread,
Dec 12, 2015, 4:32:20 AM12/12/15
to Ruby on Rails: Talk
On 12 December 2015 at 05:28, Naresh Jilla <li...@ruby-forum.com> wrote:
> Colin Law wrote in post #1179830:
>> On 11 December 2015 at 10:25, Naresh Jilla <li...@ruby-forum.com> wrote:
>>> hi all,
>>> How to install WEBrick server in ubuntu14.0
>>
>> There is no Ubuntu 14.0, perhaps you mean 14.04.
>>
>> What exactly are you trying to do? Do you mean that you want it to be
>> used when you run rails s? If so then which version of rails are you
>> using?
>>
>> Colin
>
> Hi Colin,
>
> my rails version is 4.0.2,ruby version is 1.9.3p484 and i am trying to
> design login page but when i try to start rails server following is
> message coming and i am not able open on the browser by localhost
> because it doesnot display any port number
>
> guest-QI1NUN@bitstack-vindhya:~$ rails s
> Usage:
> rails new APP_PATH [options]

That usually means you are trying to 'run rails s' from the wrong
directory. You must run it from the root of the rails application.
So you did
rails new my_app
then you must do
cd my_app
to enter that directory, then if you run ls you should see the
directories app, config and so on. Then you can run
rails s

However, I guess that you are a newcomer to Rails so suggest you start
by working right through a good tutorial such as railstutorial.org
(which is free to use online) which will show you the basics of Rails.

Colin

Naresh Jilla

unread,
Dec 12, 2015, 8:59:12 AM12/12/15
to rubyonra...@googlegroups.com
Thanque colin

Naresh Jilla

unread,
Dec 12, 2015, 8:59:12 AM12/12/15
to rubyonra...@googlegroups.com
Sai Ch wrote in post #1179852:
@Sai ch

Hi sai,

Thanque its working but i didnt change anything in config.ru is this
necessary to change as you mentioned in 4th step i just copy "rake
db:create db:migrate" this in config file but it shown error so i just
removed that but my server is start then what is the purpose of that 4th
step

Naresh JIlla

Colin Law

unread,
Dec 12, 2015, 9:14:06 AM12/12/15
to Ruby on Rails: Talk
Work through the tutorial I mentioned and all will become clear (well,
less muddy anyway).

Cheers

Colin

>
> Naresh JIlla
>
> --
> Posted via http://www.ruby-forum.com/.
>
> --
> You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-ta...@googlegroups.com.
> To post to this group, send email to rubyonra...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/51fd03d4a621e72abf2d77c64c9e9210%40ruby-forum.com.

Naresh Jilla

unread,
Dec 13, 2015, 5:55:08 AM12/13/15
to rubyonra...@googlegroups.com
Colin Law wrote in post #1179858:
> On 12 December 2015 at 09:28, Naresh Jilla <li...@ruby-forum.com> wrote:
>>> cd app_name
>>>
>> necessary to change as you mentioned in 4th step i just copy "rake
>> db:create db:migrate" this in config file but it shown error so i just
>> removed that but my server is start then what is the purpose of that 4th
>> step
>
> Work through the tutorial I mentioned and all will become clear (well,
> less muddy anyway).
>
> Cheers
>
> Colin

Once again thanque sir i just started from scratch as you mentioned and
execute my first ruby project successfully, can except your support in
further also

Naresh Jilla

Colin Law

unread,
Dec 13, 2015, 5:59:53 AM12/13/15
to Ruby on Rails: Talk
Glad to be of help

Colin

Naresh Jilla

unread,
Dec 13, 2015, 9:50:41 AM12/13/15
to rubyonra...@googlegroups.com
hi,
i just create normal form and my form is diplays fine but when i am
entering values in the field it will shown following error

ActiveModel::ForbiddenAttributesError
Extracted source (around line #6):


4.end
5.def create
6.@student = Student.new(params[:student])
7.if @student.save
8.redirect_to new_student_path
9.end

This is my controller

class StudentsController < ApplicationController
def new
@student = Student.new
end
def create
@student = Student.new(params[:student])
if @student.save
redirect_to new_student_path
end
end
end

Colin Law

unread,
Dec 13, 2015, 10:07:47 AM12/13/15
to Ruby on Rails: Talk
On 13 December 2015 at 14:11, Naresh Jilla <li...@ruby-forum.com> wrote:
> hi,
> i just create normal form and my form is diplays fine but when i am
> entering values in the field it will shown following error
>
> ActiveModel::ForbiddenAttributesError
> Extracted source (around line #6):

Have you worked right through the tutorial I suggested, including the exercises?

Colin

Walter Lee Davis

unread,
Dec 13, 2015, 1:49:56 PM12/13/15
to rubyonra...@googlegroups.com
You need a Strong Parameters - compliant params getter method in your controller. Have a read here: http://guides.rubyonrails.org/action_controller_overview.html#strong-parameters for more information.

Walter

Reply all
Reply to author
Forward
0 new messages