what is mean of Deployment?

12 views
Skip to first unread message

amritpal pathak

unread,
Apr 16, 2011, 11:32:59 AM4/16/11
to rubyonra...@googlegroups.com
what is meaning of deploy a ruby on rails application?i am new to RoR.
please somebody explain it

Thanks

Colin Law

unread,
Apr 16, 2011, 11:40:52 AM4/16/11
to rubyonra...@googlegroups.com
On 16 April 2011 16:32, amritpal pathak <amritpa...@gmail.com> wrote:
> what is meaning of deploy a ruby on rails application?i am new to RoR.
> please somebody explain it

Deployment is the process of putting the application on a production
server for use by real users.

Colin

amrit pal pathak

unread,
Apr 17, 2011, 2:08:58 AM4/17/11
to Ruby on Rails: Talk


On Apr 16, 11:40 am, Colin Law <clan...@googlemail.com> wrote:
> On 16 April 2011 16:32, amritpal pathak <amritpalpath...@gmail.com> wrote:
>
> > what is meaning of deploy a ruby on rails application?i am new to RoR.
> > please somebody explain it
>
> Deployment is the process of putting the application on a production
> server for use by real users.
Means enabling the production server from the database.yml file

amrit pal pathak

unread,
Apr 17, 2011, 2:47:57 AM4/17/11
to Ruby on Rails: Talk


On Apr 17, 2:08 am, amrit pal pathak <amritpalpath...@gmail.com>
wrote:
>    Means enabling the production server from the database.yml file??

Colin Law

unread,
Apr 17, 2011, 3:48:04 AM4/17/11
to rubyonra...@googlegroups.com

It is generally not only that as the machine that will be running the
app in production is generally not the same one used for development.
So deployment is the whole operation of getting it up and running on
the production machine, which is often a public webserver rather than
a desktop machine so the software environment is often significantly
different.

Colin

Chris Kottom

unread,
Apr 17, 2011, 4:06:51 AM4/17/11
to rubyonra...@googlegroups.com
In a strict operational sense, the term means installation and configuration/activation of software on any environment under management, so it could be meant as production, staging, integration testing, etc.  In the Rails world where development and testing are most often virtual environments coexisting on the developer's workstation, this will only be the production environment for most cases.


--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonra...@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-ta...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.


amrit pal pathak

unread,
Apr 17, 2011, 5:37:10 AM4/17/11
to Ruby on Rails: Talk


On Apr 17, 4:06 am, Chris Kottom <ch...@chriskottom.com> wrote:
> In a strict operational sense, the term means installation and
> configuration/activation of software on any environment under management, so
> it could be meant as production, staging, integration testing, etc.  In the
> Rails world where development and testing are most often virtual
> environments coexisting on the developer's workstation, this will only be
> the production environment for most cases.
I am running the application in development enviornment.I want
to run it under now production one.So what changes i have to make in
database.yml file

The content of this file as are

# SQLite version 3.x
# gem install sqlite3-ruby (not necessary on OS X Leopard)
development:
adapter: mysql
database: amritpal
username: root
password: 12345
pool: 5
timeout: 5000

# Warning: The database defined as "test" will be erased and
# re-generated from your development database when you run "rake".
# Do not set this db to the same as development or production.
test:
adapter: sqlite3
database: db/test.sqlite3
pool: 5
timeout: 5000

production:
adapter: sqlite3
database: db/production.sqlite3
pool: 5
timeout: 5000

Thanks

Chris Kottom

unread,
Apr 17, 2011, 7:27:00 AM4/17/11
to rubyonra...@googlegroups.com
Are you planning to continue using sqlite in the production environment?  Most people don't, but it's not a problem to do so.

If not or if the default sqlite settings aren't right for you, then you'll need to make some changes, but those will depend on the environment you're deploying into.  But what those should be isn't a question the mailing list can answer for you without more information.


--

amrit pal pathak

unread,
Apr 17, 2011, 11:04:01 AM4/17/11
to Ruby on Rails: Talk


On Apr 17, 7:27 am, Chris Kottom <ch...@chriskottom.com> wrote:
> Are you planning to continue using sqlite in the production environment?
>  Most people don't, but it's not a problem to do so.
>
> If not or if the default sqlite settings aren't right for you, then you'll
> need to make some changes, but those will depend on the environment you're
> deploying into.  But what those should be isn't a question the mailing list
> can answer for you without more information.

The production environment setting with sqllite are by
default .I want to use mysql for production too.So i changed the
production enviornment settings to
production:
adapter: mysql
database: blog
username: root
password: 12345
pool: 5
timeout: 5000

Is it enough??

Thanks

Peter De Berdt

unread,
Apr 17, 2011, 12:02:32 PM4/17/11
to rubyonra...@googlegroups.com
If you're running Rails 3, you're better off using "mysql2" as the adapter and you have to make sure you include the mysql2 gem in your Gemfile too. Also, you might want to use a more secure password for MySQL on your production server ;-)


Best regards


Peter De Berdt


Chris Kottom

unread,
Apr 17, 2011, 7:37:28 PM4/17/11
to rubyonra...@googlegroups.com
Also by default if you'd created the app as a MySQL app in the first place:
  encoding: utf8
  reconnect: false
  socket: /var/run/mysqld/mysqld.sock

HTH.

Mohamed Aslam

unread,
Apr 18, 2011, 2:48:27 AM4/18/11
to Ruby on Rails: Talk
All most all developers develop application in their local computer.
This is called as development environment. Once your development
completed, you need to move the application to a production server
where other people can use your website. Moving the application from
development environment to production servers called deployment.

Hope you understand.

amrit pal pathak

unread,
Apr 18, 2011, 3:21:05 AM4/18/11
to Ruby on Rails: Talk


On Apr 18, 11:48 am, Mohamed Aslam <aslamnaj...@gmail.com> wrote:
> All most all developers develop application in their local computer.
> This is called as development environment. Once your development
> completed, you need to move the application to a production server
> where other people can use your website. Moving the application from
> development environment to production servers called deployment.
>
> Hope you understand.
Thanks i got :

amrit pal pathak

unread,
Apr 18, 2011, 3:23:16 AM4/18/11
to Ruby on Rails: Talk
I am running rails 2.3.5.Now view following
adapter: mysql
database: blog
username: root
password: (will take a strong password )
pool: 5
timeout: 5000
socket: /var/run/mysqld/mysqld.sock
Is it ok
now?


Thanks

Colin Law

unread,
Apr 18, 2011, 3:56:34 AM4/18/11
to rubyonra...@googlegroups.com

Does it work? Don't forget to make the production database and to
start the server in production mode.
I would advise against using your mysql root user for rails access,
better to make a rails user and give it just the permissions it needs.

Colin

amrit pal pathak

unread,
Apr 18, 2011, 5:00:19 AM4/18/11
to Ruby on Rails: Talk


On Apr 18, 3:56 am, Colin Law <clan...@googlemail.com> wrote:
it will be created as rake db:create (after specifying in the
production enviornment i,e database: production)?? and to
> start the server in production mode.
how to start server in production mode?
is it simply script/server??
or other are to be made in other files ??
> I would advise against using your mysql root user for rails access,
> better to make a rails user and give it just the permissions it needs.
Now i will use root for some time,afterwards i will change

Thanks

Colin Law

unread,
Apr 18, 2011, 9:07:14 AM4/18/11
to rubyonra...@googlegroups.com
On 18 April 2011 10:00, amrit pal pathak <amritpa...@gmail.com> wrote:
> ...

>     it will be created as rake db:create (after specifying in the
> production enviornment i,e database: production)??  and to
>> start the server in production mode.

To create the production database
RAILS_ENV=production rake db:migrate

The setting for RAILS_ENV tells it which settings to use from
database.yml (production or development normally)

to start server in production mode

script/server -e production

Googling for
rails create production database
and
rails start server production
would probably have got you the answer to these much quicker than waiting here.

Colin

dana tassler

unread,
Apr 18, 2011, 11:41:35 AM4/18/11
to Ruby on Rails: Talk
As always, Colin has at least one good point. And I would add to
that.

Initially, you asked what is meant by deployment. Several people did
provide the answer to that question, at which point this topic could
safely have been considered "closed."

Being resourceful is always a good idea. However, this thread has
turned quickly from a question about the meaning of deployment to
"please step me through deployment of an application." ;-)

On Apr 18, 8:07 am, Colin Law <clan...@googlemail.com> wrote:

amrit pal pathak

unread,
Apr 18, 2011, 12:10:49 PM4/18/11
to Ruby on Rails: Talk


On Apr 18, 11:41 am, dana tassler <dana.tass...@gmail.com> wrote:
> As always, Colin has at least one good point.  And I would add to
> that.
>
> Initially, you asked what is meant by deployment.  Several people did
> provide the answer to that question, at which point this topic could
> safely have been considered "closed."
I too think so.Sorry for extending the question.
>

amrit pal pathak

unread,
Apr 18, 2011, 12:12:34 PM4/18/11
to Ruby on Rails: Talk


On Apr 18, 9:07 am, Colin Law <clan...@googlemail.com> wrote:
> On 18 April 2011 10:00, amrit pal pathak <amritpalpath...@gmail.com> wrote:
>
> > ...
> >     it will be created as rake db:create (after specifying in the
> > production enviornment i,e database: production)??  and to
> >> start the server in production mode.
>
> To create the production database
> RAILS_ENV=production rake db:migrate
Please tell me in which to specity RAILS_ENV=production.I
didnt
find it in enviornment.rb file

Thanks

Colin Law

unread,
Apr 18, 2011, 12:30:46 PM4/18/11
to rubyonra...@googlegroups.com

You just run the command
RAILS_ENV=production rake db:create
(note, I made a mistake before, it is db:create not db:migrate)
That sets the environment variable RAILS_ENV to production and runs
rake, then rake db:create checks RAILS_ENV so it knows which section
to use from database.yml and which file to use from
config/environments.

As I pointed out previously did you try googling for
rails create production database
before asking here?

Colin

amrit pal pathak

unread,
Apr 18, 2011, 12:46:16 PM4/18/11
to Ruby on Rails: Talk


On Apr 18, 12:30 pm, Colin Law <clan...@googlemail.com> wrote:
> On 18 April 2011 17:12, amrit pal pathak <amritpalpath...@gmail.com> wrote:
>
>
>
> > On Apr 18, 9:07 am, Colin Law <clan...@googlemail.com> wrote:
> >> On 18 April 2011 10:00, amrit pal pathak <amritpalpath...@gmail.com> wrote:
>
> >> > ...
> >> >     it will be created as rake db:create (after specifying in the
> >> > production enviornment i,e database: production)??  and to
> >> >> start the server in production mode.
>
> >> To create the production database
> >> RAILS_ENV=production rake db:migrate
> >         Please tell me in which  to specity RAILS_ENV=production.I
> > didnt
> >         find it in enviornment.rb file
>
> You just run the command
> RAILS_ENV=production rake db:create
I ran RAILS_ENV=production and then rake db:create (sussessfully
worked) It created the database with same name as my application name.
is It all done?
There is no need to change the database.yml file's production
environment settings?

Thanks

> As I pointed out previously did you try googling for
> rails create production database
> before asking here?
I tried but it didn't help.Thats why i moved here

Colin Law

unread,
Apr 18, 2011, 1:14:03 PM4/18/11
to rubyonra...@googlegroups.com
On 18 April 2011 17:46, amrit pal pathak <amritpa...@gmail.com> wrote:
>
>
> On Apr 18, 12:30 pm, Colin Law <clan...@googlemail.com> wrote:
>> On 18 April 2011 17:12, amrit pal pathak <amritpalpath...@gmail.com> wrote:
>>
>>
>>
>> > On Apr 18, 9:07 am, Colin Law <clan...@googlemail.com> wrote:
>> >> On 18 April 2011 10:00, amrit pal pathak <amritpalpath...@gmail.com> wrote:
>>
>> >> > ...
>> >> >     it will be created as rake db:create (after specifying in the
>> >> > production enviornment i,e database: production)??  and to
>> >> >> start the server in production mode.
>>
>> >> To create the production database
>> >> RAILS_ENV=production rake db:migrate
>> >         Please tell me in which  to specity RAILS_ENV=production.I
>> > didnt
>> >         find it in enviornment.rb file
>>
>> You just run the command
>> RAILS_ENV=production rake db:create
>   I ran RAILS_ENV=production  and then rake db:create (sussessfully
> worked) It created the database with same name as my application name.
>       is  It all done?

Is what all done? It created the db, what more do you expect rake
db:create to do?

>         There is no need to change the database.yml file's production
> environment settings?

If you wanted any changes you should have made them before running
db:create. It will have used the settings under production: from
database.yml.

Colin

amrit pal pathak

unread,
Apr 19, 2011, 12:09:50 PM4/19/11
to Ruby on Rails: Talk


On Apr 18, 1:14 pm, Colin Law <clan...@googlemail.com> wrote:
> On 18 April 2011 17:46, amrit pal pathak <amritpalpath...@gmail.com> wrote:
>
>
>
>
>
>
>
>
>
>
>
> > On Apr 18, 12:30 pm, Colin Law <clan...@googlemail.com> wrote:
> >> On 18 April 2011 17:12, amrit pal pathak <amritpalpath...@gmail.com> wrote:
>
> >> > On Apr 18, 9:07 am, Colin Law <clan...@googlemail.com> wrote:
> >> >> On 18 April 2011 10:00, amrit pal pathak <amritpalpath...@gmail.com> wrote:
>
> >> >> > ...
> >> >> >     it will be created as rake db:create (after specifying in the
> >> >> > production enviornment i,e database: production)??  and to
> >> >> >> start the server in production mode.
>
> >> >> To create the production database
> >> >> RAILS_ENV=production rake db:migrate
> >> >         Please tell me in which  to specity RAILS_ENV=production.I
> >> > didnt
> >> >         find it in enviornment.rb file
>
> >> You just run the command
> >> RAILS_ENV=production rake db:create
> >   I ran RAILS_ENV=production  and then rake db:create (sussessfully
> > worked) It created the database with same name as my application name.
> >       is  It all done?
>
> Is what all done?  It created the db, what more do you expect rake
> db:create to do?
I mean it is all i have done to enable production
enviornment?
>
> >         There is no need to change the database.yml file's production
> > environment settings?
>
> If you wanted any changes you should have made them before running
> db:create.  It will have used the settings under production: from
> database.yml.

The changed contents of database.yml file are

# SQLite version 3.x
# gem install sqlite3-ruby (not necessary on OS X Leopard)
development:
adapter: mysql
database: amritpal
username: root
password: 12345
pool: 5
timeout: 5000

# Warning: The database defined as "test" will be erased and
# re-generated from your development database when you run "rake".
# Do not set this db to the same as development or production.
test:
adapter: sqlite3
database: db/test.sqlite3
pool: 5
timeout: 5000

production:
adapter: mysql
database: production
username: root
password: 12345
pool: 5
timeout: 5000

Now again i ran " RAILS_ENV=production rake
db:create ",it created a production database.I hope now the prduction
enviornment is enable?

Thanks

amrit pal pathak

unread,
Apr 19, 2011, 12:26:36 PM4/19/11
to Ruby on Rails: Talk
I think the production enviorment is still not enabled.because i when
i tried
script/generate scaffold person firstname:string lastname:string;
rake db:migrate(it created a table named"people" in
amritpal database that is used in development envionrment.But in
production enviornment ,the database production hasn't any talbe)

Means still i working in development??

Thanks

Colin Law

unread,
Apr 19, 2011, 12:55:27 PM4/19/11
to rubyonra...@googlegroups.com

As I have tried to explain several times the value of RAILS_ENV
determines which environment will be used when you execute a rake
command. The environment defaults to development. So:

rake db:migrate will migrate the development db.

RAILS_ENV=production rake db:migrate
will migrate the production db.

Colin

Reply all
Reply to author
Forward
0 new messages