I am new as rails developer. I have crowdsourcing platform code which is on code for crowd sourcing platform
And want to put this on my rails application domain. From where I have to start and what I have to do for complete this task?
Thanks for reply in advance.
The crowdsourcing platform you mention - Selfstarter - is a rails app itself.
Here's what you need to get started:
Pull the code down to your computer from the github repo with the following command:
git clone https://github.com/lockitron/selfstarter.git
change directory into the cloned repo directory:
cd selfstarter
Create the database and the tables with the following command:
bundle install --without production
Start the rails server:
rails server
Access the client from the url http://localhost:3000
You will have the bare bones selfstarter app as shown in the image below:
All this is explained in the README of the selfstarter github repo.
To be able to understand how this was done, and to be able to customize the app for your specific needs, it would help if you learn the basics of Ruby on Rails. I would strongly recommend the freely available online Ruby on Rails Tutorial
Related
very new to all this. I am following a tutorial to get Heroku running through ruby on rails.
I have Microsoft Windows so I am currently following Heroku's official tutorial and am stuck here
I installed PostgresSQL 10.1 using windows installer x86-64 and have noted my login information for Postgres.
However, I do not understand this part:
Remember to update your PATH environment variable to add the bin
directory of your Postgres installation. The directory will be similar
to this: C:\Program Files\PostgreSQL\<VERSION>\bin. If you forget to
update your PATH, commands like heroku pg:psql won’t work.
The closest thing I could find to an explanation and tutorial was this Java site.
I went inside Enviromental Variables and set the system path to: C:\Program Files\PostgreSQL\10\bin
However, when I tried testing it out by typing in heroku pg:psql, it said no app specified so I'm unsure if I did it correctly or not.
Also, the next tutorial step is:
Open the config\database.yml file and set the username and password
for your local (development) database. Look for these line:
I searched and I have no such file on my computers. Needless to say, I'm stumped. Any assistance to progress through the tutorial is appreciated. Thank you.
regarding your first error, the problem is that you are not specifying for which app you want to open the database cli (psql). Hopefully, the solution is easy:
heroku pg:psql --app app_name
# or
heroku pg:psql -a app_name
About the second question, the tutorial assumes that you have already created an application.
If you go to the root path of your project, you will find some subfolders such as app, config, db, lib, public, tmp, vendor.. Here you will find config\database.yml.
I am trying to deploy my rails app to heroku. However, it seems that there is a long process to do. I have to change my db but I do not know how! I also want to know how to push to heroku please!
Thanks in advance!
I think you might be interested in Michael Hartl's tutorial where there is section on deploying to Heroku.
Remember that you will need Git before deploying to Heroku. There is good info on that in same tutorial here.
I hope this helps.
Read this instruction https://devcenter.heroku.com/articles/getting-started-with-rails4
I usually create a Git repo on GitHub or BitBucket and push my Rails project there. Then I go to Heroku website, manually create a new project there (in a dashboard) - and right after that step Heroku provides a detailed list of the Git commands describing how to pull your code from, say, GitHub.
After that you need to run migrations on Heroku - you can do that on your local machine in the console window - but you need to install Heroku CLI (locally) first.
That's it basically. After that Heroku starts your app automatically.
It is not required for you to deploy your code on GitHub or BitBucket. After you init a Git repo locally, you can directly push to Heroku Git. But I prefer use BitBucket as a convenient storage additionally.
I have a complete ruby project on my system that I downloaded from github.com and I want to run it on my Windows machine.
I have already installed Ruby and Rails on my system, but I have no idea how to run this project. The directory of this project is something like:
C:\Users\{username}\Desktop\BitcoinFundi\BitcoinFundi
How would I run this project on my system?
To run your Ruby on Rails application, use the following command:
rails server
This will start the server and you will be able to access the application in your browser at http://localhost:3000. Port 3000 is default and you can change it in the application settings.
To run a Ruby script use:
ruby name_of_script.rb
You should check out various resources and tutorials on getting started with rails.
As you say in your comment this is your first experience with Ruby on Rails, I think you should follow through chapter 1 and 2 (at least) of Ruby on Rails Tutorial. After that you should have a better understanding of how you start up a rails app and configure the DB. You also need a bunch of other libraries and software such as mysql from the sounds of it.
You should also read Getting Started with Rails. Section 4 covers how to start the default rails server.
Here is a guide on setting up a Rails environment for Windows, which is one of many guides, that shows you some of the needed steps to get a fully working environment.
I'm not a RoR programmer myself, but a good client of ours has sent a project their previous web team built and I need to get it up and running on their server.
The server uses cPanel and Ruby on Rails is already installed. I've created a project via the cPanel wizard and located the file tree via SSH.
Using SSH, I've tried to replace this file tree with the project I've been sent, but when I hit 'run' in cPanel, the application doesn't actually start (although the success message would indicate that it has).
If I leave the original cPanel-created application in place, I can run/stop no problem and the web interface at :12001 opens up just fine.
I assume there are either conflicts with RoR versions that I need to resolve, or there's simply more to it than just replacing the file tree? Again I'm not a RoR programmer and I'm having a hard time finding a migration guide that tells me anything other than "set up in cPanel and replace the files".
I'd very much appreciate either some genuinely useful links to RoR application setup/migration guides (ideally for cPanel) or a step-by-step answer please.
First, forget Cpanel for now. Try in one environment where you can control everything.
Try to know better the rails version used and the associated gem19s or plugin if from 2.x days. The ruby version is important too, only then you can start defining a plan.
I'm afraid you won't get a step-by-step answer, but I'm sure you can be pointed in the right direction by providing the requested information.
Simple questions: Do you have a Gemfile file at the top at your project? Do you have any plugins (stuff in vendor/plugins)?
Update:
With the Gemfile provided here are the required steps:
Install ruby (if you haven't install it using rvm. The version 1.9.3-x should be the safest.
Install rubygems
Install bundler
Go the project dir and run bundle install
run rake db:migrate (assure you have the database setup acording to config/database.yml
run rails s and check the logs and see if the server is up.
If after installing bundler, you don't have the bundle command in your path, you need to add this your .bash_profile:
PATH=$PATH:$HOME/.local/bin:$HOME/bin
export PATH
Im new to github.. I have register my name there, I'm not a rails developer, but i want to learn Ruby on Rails.
Have someone any idea about its basic tutorials for creating Ruby on Rails applications, execute them etc
Thanks in advance
GitHub isn't a web host, it's a version control repository. You put your source code there to share with others (either the general public, for open source stuff, or members of your team).
For getting going with Rails, I'd suggest Heroku. It uses git as the way to get your app running on their servers, which is ridiculously simple. It's also free to get going, you only need to pay if your web traffic gets too big or if you want to use advanced features.
When I was learning Rails, the two sources that helped the most were the Pragmatic Programmers book Agile Web Development with Rails book and Ryan Bates' excellent Railscasts site.
http://guides.rubyonrails.org/getting_started.html will help you i think.You can start reading from here.
If you want to run a project from git the you have to do the following
->git clone git#github.com:Project/project.git [A public project of github]
->cd project
->bundle install
->rake db:migrate
->rails server
but before this you have to set up your ruby on rails environment.Rubymine is one of the best IDE for ROR development.
Best of Luck !!!!
Check out some tutorials from here - http://www.rubyonrailstutorials.com/
Almost all of them include describing work with git and github.
Well, first of all you should check the documentation from the framework's page at http://rubyonrails.org
A quick guide to run the server locally:
For rails application prior to version 3.0 you should run:
ruby script/server
For newer applications you should run:
rails server
But there are probably a lot of other topics to review first (depending on the application):
Dependency installation
Database configuration
Custom initializers
Etc...
If the application doesn't have a decent Readme file or any other documentation you should probably need to ask the application author for some help.
Hope that help, don't give up, there are a lot of new things to learn but I think the effort worth it. Good luck.
After cloning
1.install rbenv or rvm for managing and installing ruby
In terminal(your project root)
2. sudo gem install bundler
3. bundle install
3. rails s