ruby in cpanel

Hello. I have a ruby app I am trying to install on a shared server with linux on it through cpanel version 11.30.4.6.

there is a .rb file and a config.yaml file. I am attaching the yaml file and also a screenshot of the cpanel interface. It seems that the host support don't know how to install this.
I wonder if anyone else knows how I do this. Where should I put the .rb file and the .yaml file and what changes do I need to make to the yaml file. I know I need to set up the user name password database and server but not sure about any other stuff.

Thanks very much.

 cpanel ruby control cpanel ruby control cpanel ruby control
 
this is the config.yaml file:

---
# General configuration
##########################

# Number of tweets until the configuration file is refreshed, specifically to 
# determine if Save_to_database has been changed without needing to restart the script
tweets_until_refresh: 200

# Twitter account credentials
##########################

Twitter: {
	Username: twitter_username,
	Password: twitter_password
}

# Database configuration
##########################

Save_to_database: true
Database: {
	# Connection info
	Server: 'localhost',
	Database: db_name,
	User: db_user,
	Password: password,
	
	# Table where the tweets are to be saved
	Table: tweets,
	
	# To increase performance, database saves occur in batches
	# Flush_rate determines after how many tweets a database
	# insert occurs
	Flush_rate: 10
}

# Flat file information
##########################

File_path: ./
File_name: tweets
Rows_per_file: 50000

# Tweet fields to save
# Note: the field names of compound fields (i.e., entities or user)
#		in the csv file and database will be the main field plus sub
#		field, joined with an underscore.
#		e.g., for urls under entities, the field name will be entities_urls
		
##########################
Fields: {
	contributors: true,
	coordinates: true,
	created_at: true,
	entities: {
		urls: true,
		hashtags: true
	},
	favorited: true,
	geo: true,
	id: true,
	id_str: true,
	in_reply_to_screen_name: true,
	in_reply_to_status_id: true,
	in_reply_to_status_id_str: true,
	in_reply_to_user_id: true,
	in_reply_to_user_id_str: true,
	place: true,
	retweet_count: true,
	retweeted: true,
	source: true,
	text: true,
	truncated: true,
	user: {
		profile_background_color: true,
	    utc_offset: true,
	    contributors_enabled: true,
	    created_at: true,
	    screen_name: true,
	    description: true,
	    profile_text_color: true,
	    profile_image_url: true,
	    statuses_count: true,
	    default_profile: true,
	    id_str: true,
	    show_all_inline_media: true,
	    time_zone: true,
	    profile_link_color: true,
	    profile_background_image_url: true,
	    listed_count: true,
	    profile_sidebar_border_color: true,
	    verified: true,
	    protected: true,
	    url: true,
	    is_translator: true,
	    default_profile_image: true,
	    profile_use_background_image: true,
	    profile_background_tile: true,
	    notifications: true,
	    follow_request_sent: true,
	    friends_count: true,
	    lang: true,
	    profile_sidebar_fill_color: true,
	    name: true,
	    geo_enabled: true,
	    id: true,
	    favourites_count: true,
	    following: true,
	    followers_count: true,
	    location: true
	}
}

Open in new window

onyourmarkAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Jayachandran PalanisamyTechnical Consultant - LinuxCommented:
Hi,
Creating a Ruby on Rails Application

After you are sure your website's server has a working version of Ruby that is accessible to you, you can create and deploy a Ruby on Rails environment. Ruby on Rails runs on its own server so the setup requires a little extra work.

   1. Log into cPanel.
   2. Navigate to the Software/Services section of your cPanel interface.
   3. Click the Ruby on Rails icon.
          * This step will open the Ruby on Rails management interface.
   4. Specify your application's name in the App Name field.
          * Remember: To set your application to load when the server is booted, click the Load on Boot? checkbox.
   5. Assign the application path in the Application Path field.
          * Note: If you set an application path in your public_html/ directory, your source code and configuration files can be viewed by anyone on the web.
   6. Use the Environment drop-down menu to select the type of Ruby on Rails environment you wish to run.
   7. Click Create.

Once the application has been installed, you can activate your Ruby on Rails environment by clicking Run in the Available Ruby on Rails Applications table.

Creating a Rewrite

Because Ruby on Rails uses its own server, users visiting your website (and subsequently your Ruby on Rails application) will need to be redirected to the appropriate port.

Ruby does not respond on the standard HTTP port number, 80. Thus, visitors would need to specify the port number with the domain — for example, example.com:12001.

PICK Remember: Ruby application port numbers increment automatically with every new application. This means that, if you are on a shared server, you will simply be assigned the next available port number. Your first application will not necessarily run on port 12001.

To configure Ruby to respond without visitors having to specify a port number, you will need to configure a rewrite.

To configure a rewrite:

   1. Log into cPanel.
   2. Navigate to the Software/Services section of your cPanel interface.
   3. Click the Ruby on Rails icon.
          * This step will open the Ruby on Rails management interface.
   4. Click the Create Rewrite button corresponding to the appropriate application in the Create A Rewrite table.
   5. From the drop-down menu, select the domain, subdomain, or addon domain on which you wish to run your Ruby application.
          * If you wish to run the application from a new page within your domain, type the page name you wish to use into the available text field.
   6. Click the Save button.

Additional Applications and Rewrites

If you intend to run multiple Ruby applications, you will need to configure additional ports to respond using Ruby on Rails and, if necessary, additional rewrites to disguise the port change. To do so, simply add an application as described in the Deploying a Ruby on Rails Environment section. By default, the new application will respond on the next available port number — for example, if your first application runs on port 12001, the second may run on port 12002 or higher.

Remember: Ruby application port numbers increment automatically with every new application. This means that if you are on a shared server you will simply be assigned the next available port number. Your first application will not necessarily run on port 12001. This also means that your application port numbers may not be consecutive.

To configure an additional rewrite, simply follow the steps outlined above. You will need to use a new domain, addon domain, subdomain, or page (for example: example.com/RubyApplication) for the rewrite. You will not be able to configure 2 Ruby applications to respond on the same domain, subdomain, addon domain, or page.

I hope the following links will help you further.
http://forums.glowhost.com/knowledge-base/how-create-ruby-rails-application-using-cpanel-932.html
http://docs.cpanel.net/twiki/bin/view/AllDocumentation/RubyonRails/DeployingRuby

Regards,
Jay
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Ruby

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.