Topic: [Newbie Problem] Mounting the Application

Hello, I'm new here but I'm learning Ruby and Rails.

I have my application ready, actually is not my application I downloaded from Internet because I need to try how to mount on Ruby on rails.

I have this done:

Framework Ruby on Rails ready.
The site present the Ruby on Rails message.
Like this:
http://ideasparamigobierno.com/

The question is:
Where do I have to upload my APP?
In the html_public? or in the hosting /root?

When do I have to execute the script and the db seeder?

Thanks.

Re: [Newbie Problem] Mounting the Application

The answer will vary depending on your hosting provider.  Typically, when you purchase an account,  they provide you with YOUR home directory, say

/users/siriaco

You'd probably want to create a subdirectory there,  so you can seperate your rails app from anything else you might do with your account,  so maybe you create a directory rails

/user/siriaco/rails

copy your entire site there,  so you end up with

/user/siriaco/rails/app
/user/siriaco/rails/config
/user/siriaco/rails/public
etc.

When you configure Apache (we must assume) to run your app,  you'd tell Apache that your web application has it's root at

/user/siriaco/rails/public

Then you'd tell whatever you are using to deploy your Rails environment that the Rails root is

/user/siriaco/rails

This last part will vary greatly depending on how you are deploying,  if you use Passenger,  you simply have to tell passenger about

/user/siriaco/rails

And it figures everything out for you.

If you use the

rake db:setup

command, it will create the database,  create the tables and such,  then run your seed,  you'd have to do that AFTER you copied your app to the host.

Joe got a job, on the day shift, at the Utility Muffin Research Kitchen, arrogantly twisting the sterile canvas snout of a fully charged icing anointment utensil.

Re: [Newbie Problem] Mounting the Application

Hello, and thanks for the answer.

My hosting is a reseller hosting from Hostmonster , and I think I have all the control of the directories with my cpanel.
I'm planning to mount at this location on my hosting:
http://ideax.waltercatter.com , and the domain name assigned for this directory is www.ideasparamigobierno.com

I have this dir:

/home2/walterc1

That is my main/root.
And the example of directories on my entire site is:

http://postimage.org/image/6i7aq2nat//


Automatically the cpanel creates the "ideax" directory on the main root, I named like that, and other in my public_html named like the same ("ideax") this confuses me, because I don't know where upload my Application.

My application have this structure:
http://s12.postimage.org/ra4cyt3f1/ideax.jpg
This structure looks like the "ideax" main root folder.

When this step is complete and my APP uploaded to the right place I understand I have to run an script and next seed the DB.

I'm ok at this part? if is everything ok, where do I connect the DB (also created) with my app?

Btw I  used a guide from here:
https://my.hostmonster.com/cgi/help/rails
I complete all the guide but no the point #6 because I have my own app to mount.

Hope all my info is ok.


Sorry my English and how newbie sound all this.

Last edited by SiriacO (2011-12-10 20:44:29)

Re: [Newbie Problem] Mounting the Application

>>I'm ok at this part? if is everything ok, where do I connect the DB (also created) with my app?

First let me say this,  If I had to identify the worst 6 hours of my life,  I would have to say it was spent in Lima.  I was flying from Buenos Aires to Los Angeles,   and I ended up with a 6 hour layover in Lima,  so I went to the VIP lounge for American Airlines,  Every Body was smoking in the lounge!  It was horrible!!

OK, not your fault :<

So, at step 6,  it tells you to create a database user,  so do that, pick a username and password,  then in:

config/database.yml

in your application,  enter THAT username and password,  and make sure you specify that your database is MySQL,  so it would look something like:

production:
  adapter: mysql
  database: library_production
  username: whatever_you_specificed_in_step6
  password: whatever_you_specificed_in_step6
  host: localhost
Joe got a job, on the day shift, at the Utility Muffin Research Kitchen, arrogantly twisting the sterile canvas snout of a fully charged icing anointment utensil.

Re: [Newbie Problem] Mounting the Application

Yes, Perú is a great country but the education in some sectors is the worst in South America, sorry for the negative experience. You just have to know every country around the world have different kind of people. =[

I have to say something additional about the app, you will find the README file inside my app folder in the attached picture in the last post, this file says this:

To customize the open source version for your project, edit the following files:

    config/environment_custom.rb
    config/database.yml
    config/gmaps_api_key.yml
    config/newrelic.yml
    config/twitter_config.yml (if you want Twitter support)
    config/facebook*.yml (if you want to experiment with Facebook; currently not supported)

To customize the UI for your project, fill in the files in the following directories:

    app/views/custom/
    public/stylesheets/sass/
    public/images/

UI elements that pertain to your brand need not be contributed back to the project

==================

To set up the database, give your bbyidx user permission to use the "load data" command:

    grant file on *.* to bbyidx;

Then run the seed script to initialize the DB:

    rake db:seed

The database.yml is writed with my DB information.
Others I will edit later.

All this section I'm lost. 

To set up the database, give your bbyidx user permission to use the "load data" command:

    grant file on *.* to bbyidx;

Then run the seed script to initialize the DB:

    rake db:seed 

How to add permission to execute the "load data" command? this is through SSL I think.
grant file on *.* to ideax; ----- In my case.

I have to execute through SSH the script command and the seed command I think, but where and which files I have to upload?
and in which folder? the public or the hidden one?.

Is all the configuration through SSH?

Re: [Newbie Problem] Mounting the Application

The grant statement is a SQL command,  you have to start mysql command line interpreter first,  then enter that command

>mysql
mysql>grant file on *.* to bbyidx;
mysql>exit
>

You do all your rails commands in root of the rails app,  NOT  the rails public directory

Joe got a job, on the day shift, at the Utility Muffin Research Kitchen, arrogantly twisting the sterile canvas snout of a fully charged icing anointment utensil.

Re: [Newbie Problem] Mounting the Application

Thanks for your answers! I will try. BRB!

Re: [Newbie Problem] Mounting the Application

Ok, I did well I think, now the problem is only the DB conection I think.
Running this command:

rake db:seed
(in /home2/walterc1/ideax)
DEPRECATION WARNING: Rake tasks in vendor/plugins/acts_as_tsearch/tasks, vendor/plugins/acts_as_tsearch/tasks, vendor/plugins/fixture_scenarios/tasks, vendor/plugins/fixture_scenarios_builder/tasks, vendor/plugins/rails-authorization-plugin/tasks, vendor/plugins/rails_rcov/tasks, and vendor/plugins/ym4r_gm/tasks are deprecated. Use lib/tasks instead. (called from /usr/lib64/ruby/gems/1.8/gems/rails-2.3.11/lib/tasks/rails.rb:10)
rake aborted!
no such file to load -- rcov/rcovtask
/home2/walterc1/ideax/Rakefile:11
(See full trace by running task with --trace)