Is there a good tutorial explaining how to use Neo4j in Rails and get it setup on Heroku.
I am having trouble understanding how I am suppose to setup Neo4j and Rails locally for testing before I deploy on Heroku. On my local machine what exactly am I suppose to do in Rails to setup Neo4j given that Neo4j is an embedded Java database but Rails is Ruby based. More precisely, where in rails do I give the command "run the Java virtual machine"?
Well, you are right. For embedded Rails setup, this is not the right place. How about doing Amazon instead for that scenario? Otherwise, try https://github.com/maxdemarzi/neography which works great on Heroku?
Related
A website is shared to me on github. I'm working on it, but I can't do modifications on the actual site page yet. I need to see how the changes I make look like.
How can I have a live preview from rails? I was used to use xampp for the html/css stuff. Is there anything similar to that? If not, what are my choices?
The usual workflow is to setup a development environment on your local machine. The tools you will need for this are roughly:
git, to clone the github repository to your local machine
ruby (what version you need depends on the project), preferably you use a version manager such as rvm or rbenv
the correct database (again depending on your project, e.g. mysql or postgresql)
Once you have a ruby version installed, the first step will be to run 'bundle' to install all dependent ruby libraries. If that was successful you can configure your database in a file that either exists already or should be added: config/database.yml in which you configure the database connection.
You would use the command 'rake db:create db:migrate' to setup the database according to the projects migrations (=> specifying the database layout).
You might want to make yourself a bit familiar with ruby on rails, by following some good beginners tutorial. In the official rails guides that would be: http://guides.rubyonrails.org/getting_started.html
It is not as 'out-of-the-box' as you might be used to from xampp , so there might be a bunch of pitfalls in the way (especially if you're running on windows and not linux / mac).
It is hard to give you a complete walkthrough without knowing the application and your system.
Depending on who's developing the application you might also ask them to provide you with a VM, e.g. using a tool called 'vagrant' to simplify the setup for you. You will still need to get more familiar with git, in case you aren't yet.
Hi you can first keep your apache on xampp running normal.
Go to command prompt if you are on windows. Go to the root of your application on your computer.
Then run
rails server
To open the server. If you done all that correctly it should open on your browser at
Localhost:3000
Then you can take it from there.
I have a rails app that needs to be put online (anywhere) - I am using a windows machine, I tried to deploy it using Heroku but that was a huge pain. The app only needs to go online so I can show it to someone - It only needs to be up about a week, so setting up a Virtual Linux system on my windows laptop is not a preference for me.
It sounds like you need to follow a specific procedure to get Gemfile.lock to work for Heroku. This answer has some basic instructions: https://stackoverflow.com/a/21488679/693349
However, you'd probably do better to read the full Heroku docs about "Deploying a Ruby Project Generated on Windows": https://devcenter.heroku.com/articles/bundler-windows-gemfile.
Have you tried Digital Ocean?
https://www.digitalocean.com/features/one-click-apps/ruby-on-rails/
Normally deployment at heroku works like charm, what was the problem?
Try Capistrano gem. Is an especific gem to deploy Ruby on Rails projects and it works perfect!
You have a good tutorial here to configure Capistrano.
Once I've finished my Ruby On Rails app, I want to deploy it on a server.
What steps should I do?
Should I generate a file as for example a .war in Java?
Thanks a lot
Capistrano is the most popular way to deploy Ruby On Rails. Enjoy this screencast.
If you're deploying to regular server (non cloud) you can use the capistrano gem here's a good screencast on how to. If you want a cloud based service you can't beat Heroku.
You can follow this link.You will get a clear idea about Ruby On Rails app deploy
http://rubyonrails.org/deploy
Ideal and Easy way - you need to you best practices like
Version control with Git
Heroku Setup (which is free) (You can think for engine yard)
Here is the few links
Version control with Git
Deploying with Heroku
Link from Heroku
Please let me know if you need more information on this.
I am in the process of learning Ruby on Rails and things have been going smoothly - up until I tried to deploy one of my test applications to my shared hosting account.
I use Host Gator and was able to successfully create a new Ruby on Rails app via cPanel and run it. The only problem is that when you create a new app this way, it populates its directory with a blank application - as would rails new app_name locally. When I delete the files and folders in this directory and replace them with my own, then attempt to run the app, cPanel says that it is running on the confirmation page but it never actually starts. I am not receiving any error messages either.
The host seemed rather stumped, stating that it should be a matter of deleting the initial files and folders and replacing them, then running. The app works fine locally so I do not think that it is a code issue. In my research I came across Passenger, although it is way over my head and it would appear that you really need to have total control over Apache to make it all work, including ssh.
If it makes any difference, the apps I made locally were put together using an installation of Rails Installer and are scaffolded. For testing I am using a bare minimum app with about three fields in the table.
What am I missing? Any help would be appreciated.
Maximum supported versions on 26/10/2013 are:
Ruby 1.8.7
RubyGems 1.8.25
Rails 2.3.18
Anything newer than that is a near guaranteed breakage and cPanel & WHM will be incapable of utilizing it in any way, shape, or form.
We can assist you with removing your existing Ruby on Rails installations and reverting them back to cPanel supported and sanctioned versions (Ruby 1.8, RubyGems 1.8, and Rails 2). That is the only thing we can do for you at this time.
If you want to use any versions newer than this, then you will be unable to use the cPanel & WHM interfaces or management tools for it -- they simply will not work. You will then have to manually manage your RoR install by yourself through command line exclusively. None of it would fall under the scope of cPanel support.
You can use http://ndeploy.in which is a third party plugin to integrate Rails Hosting via Phsuion Passenger in cPanel .
Just to let others who is using Cpanel with rails know.
I was able to use Cpanel to create a rails app, start it, and do the redirection all within Cpanel.
Nothing to modify or change. Quite straightforward for me.
So I guess it would be easier to do the development work straight on the server itself.
Have not tried to deploy a locally developed rails to shared server, or any per se. But I'm guessing we could create rails with Cpanel and replace the files in the directory generated.
We really like the idea of hosting with Amazon EC2 and the excellent EC2 on Rails, but our cashflow isn't enough to justify a move to EC2. So we've decided to host with linode. Now we're trying to put together the best Rails server build.
For those that don't know, EC2 on Rails is an opinionated Ubuntu Linux Server image for Amazon's EC2 hosting service. Out of the box, it runs a standard Ruby on Rails application with little to no customization.
So, is there something like EC2 on Rails for linode?
We'd need at least the following:
Ruby 1.8.7
Ruby on Rails 2.3.8
MySQL 5
memcached
Automatically runs hourly, daily, weekly and monthly scripts if they exist in Rails application’s script directory
Local Postfix SMTP mail server
SSL support
Passenger + Ngnix or Mongrel + Apache
32 bit image Ubuntu
With a railsy setup, meaning fast and simple. So, anyone run across anything like EC2 on Rails, but for linode?
I have been using linode for my personal use for a while and I think no matter what, you are probably going to have to get your hands dirty. I kind of like it for exactly that reason, but that is just my taste. They do have stack scripts with some predefined setups. The closest I can find to what you are looking for is a ruby/apache/mysql script that is fairly customizable.
From the script:
Installs a fully functioning, ready to
go stack that's optimized specifically
for your Linode's resources. By
default, it creates a VirtualHost
using the reverse DNS of your Linode's
primary IP.
This installs a stack based on Ruby,
Apache, and MySQL. This also gives you
the options to install gems so that
you can be up and running Ruby on
Rails in no time.
Optionally creates a MySQL database
and user, and assigns that user grants
to the database.
You may use this as an example for
creating more VirtualHosts. Set up
VirtualHosts, install your sites,
point your domains to your Linode, and
you're set!
This script downloads and compiles the
source from Ruby's ftp. Along with
Ruby, the latest version of ruby gems
is installed and you have a choice of
initial gems to install. Rails and
passenger can be used to have a ready
to go Rails server. Once this script
has finished be sure to run
'passenger-install-apache2-module' to
complete the passenger install.
Note that this script may take 1.5 - 2
hrs depending on the gems that are
specified.
All details of this stack script are
logged to /root/log.txt and the stack
script is finish when the line
"StackScript Finished!" is written to
the log file.
You might have good luck talking to their support though, they might have some more secret sauce that I haven't found yet.
Nothing in that setup sounds EC2-specific beyond the name. It appears it is just convenient to use with EC2, because they let you grab a disk image from another account.
You are welcome to create your own StackScript to do this and contribute it to the community. Once a StackScript is written, it can be marked public and used by others. EC2 on Rails has a public GitHub repository from which you can get started, and honestly, I'd love to see things like this ported to the StackScript system.