Migrating a complete Ruby rails app off heroku!!!

171 views
Skip to first unread message

Rails Goa

unread,
Jun 30, 2015, 5:07:43 AM6/30/15
to rubyonra...@googlegroups.com
This is been driving me nuts for the last week.

The requirement: a Friend has a complete ruby rails app currently (was) running on heroku. It's dead now as they don't support the bamboo stack anymore.

So he's asked me to help him take it off heroku (ok done that got all the code and db and everything).... and he wants to move it to a new / cloud server.

So ok. I've set-up an Ubuntu 14.x LTS Server for him and got the code oj to that. That's done and fine.

But it just won';t run. Compiles, etc. But whatever I say or do it won't run. I done it all:
* Pointed to a local DB. Postgres - set-up and working on local.
* Moved DB from heroku to local with all data. Fine.
* Compiled it - bundle install.
* Yet when i run it... with ==>  foreman start
13:54:36 web.1     | started with pid 12212
13:54:37 web.1     | I, [2015-06-30T13:54:37.799228 #12212]  INFO -- : listening on addr=0.0.0.0:5000 fd=10
13:54:37 web.1     | I, [2015-06-30T13:54:37.799328 #12212]  INFO -- : worker=0 spawning...
13:54:37 web.1     | I, [2015-06-30T13:54:37.800127 #12212]  INFO -- : master process ready
13:54:37 web.1     | I, [2015-06-30T13:54:37.800917 #12213]  INFO -- : worker=0 spawned pid=12213
13:54:37 web.1     | I, [2015-06-30T13:54:37.801238 #12213]  INFO -- : Refreshing Gem list
13:54:37 web.1     | DEPRECATION WARNING: require "activerecord" is deprecated and will be removed in Rails 3. Use require "active_record" instead. (called from /home/online/kacstbook-engage/vendor/bundle/ruby/1.8/gems/activerecord-2.3.15/lib/activerecord.rb:2)
...... AND THEN .......

tialized constant DEFAULT_HOST
13:56:09 web.1     | #<NoMethodError: undefined method `application' for Rails:Module>
13:56:09 web.1     | E, [2015-06-30T13:56:09.106145 #12225] ERROR -- : reaped #<Process::Status: pid=12235,exited(1)> worker=0
13:56:09 web.1     | I, [2015-06-30T13:56:09.106294 #12225]  INFO -- : worker=0 spawning...
13:56:09 web.1     | I, [2015-06-30T13:56:09.107351 #12239]  INFO -- : worker=0 spawned pid=12239
13:56:09 web.1     | I, [2015-06-30T13:56:09.107525 #12239]  INFO -- : Refreshing Gem list
13:56:09 web.1     | DEPRECATION WARNING: require "activerecord" is deprecated and will be removed in Rails 3. Use require "active_record" instead. (called from /home/online/kacstbook-engage/vendor/bundle/ruby/1.8/gems/activerecord-2.3.15/lib/activerecord.rb:2)
13:56:12 web.1     | /home/online/kacstbook-engage/config/initializers/paperclip.rb:6: warning: already initialized constant DEFAULT_HOST
13:56:12 web.1     | #<NoMethodError: undefined method `application' for Rails:Module>
13:56:12 web.1     | E, [2015-06-30T13:56:12.745513 #12225] ERROR -- : reaped #<Process::Status: pid=12239,exited(1)> worker=0
13:56:12 web.1     | I, [2015-06-30T13:56:12.745670 #12225]  INFO -- : worker=0 spawning...
13:56:12 web.1     | I, [2015-06-30T13:56:12.746711 #12243]  INFO -- : worker=0 spawned pid=12243
13:56:12 web.1     | I, [2015-06-30T13:56:12.746847 #12243]  INFO -- : Refreshing Gem list
13:56:12 web.1     | DEPRECATION WARNING: require "activerecord" is deprecated and will be removed in Rails 3. Use require "active_record" instead. (called from /home/online/kacstbook-engage/vendor/bundle/ruby/1.8/gems/activerecord-2.3.15/lib/activerecord.rb:2)
13:56:15 web.1     | /home/online/kacstbook-engage/config/initializers/paperclip.rb:6: warning: already initialized constant DEFAULT_HOST
13:56:16 web.1     | #<NoMethodError: undefined method `application' for Rails:Module>
13:56:16 web.1     | E, [2015-06-30T13:56:16.003923 #12225] ERROR -- : reaped #<Process::Status: pid=12243,exited(1)> worker=0
13:56:16 web.1     | I, [2015-06-30T13:56:16.004079 #12225]  INFO -- : worker=0 spawning...
13:56:16 web.1     | I, [2015-06-30T13:56:16.005235 #12247]  INFO -- : worker=0 spawned pid=12247
13:56:16 web.1     | I, [2015-06-30T13:56:16.005557 #12247]  INFO -- : Refreshing Gem list
13:56:16 web.1     | DEPRECATION WARNING: require "activerecord" is deprecated and will be removed in Rails 3. Use require "active_record" instead. (called from /home/online/kacstbook-engage/vendor/bundle/ruby/1.8/gems/activerecord-2.3.15/lib/activerecord.rb:2)
13:56:19 web.1     | /home/online/kacstbook-engage/config/initializers/paperclip.rb:6: warning: already initialized constant DEFAULT_HOST
13:56:19 web.1     | #<NoMethodError: undefined method `application' for Rails:Module>
13:56:19 web.1     | E, [2015-06-30T13:56:19.368604 #12225] ERROR -- : reaped #<Process::Status: pid=12247,exited(1)> worker=0

See the ==> <NoMethodError: undefined method `application' for Rails:Module>

Any suggestions. I'm at my wits end. tried everything...... And I just can't see anything in port 5000!

Thanx.

Goan.


Frederick Cheung

unread,
Jun 30, 2015, 5:40:31 AM6/30/15
to rubyonra...@googlegroups.com, onlin...@gmail.com


On Tuesday, June 30, 2015 at 10:07:43 AM UTC+1, Rails Goa wrote:

13:56:19 web.1     | E, [2015-06-30T13:56:19.368604 #12225] ERROR -- : reaped #<Process::Status: pid=12247,exited(1)> worker=0

See the ==> <NoMethodError: undefined method `application' for Rails:Module>

Any suggestions. I'm at my wits end. tried everything...... And I just can't see anything in port 5000!


Rails.application exists only in rails 3 & above and from the log you appear to be running rails 2.3.15. At a guess you've a gem installed that requires rails 3 (or possibly rails 4). If you had run `bundle update` and some of your version constraints were quite loose then that might explain it.

Fred
 

OPSPL Goan

unread,
Jul 1, 2015, 9:33:31 AM7/1/15
to rubyonra...@googlegroups.com
Hi Fred,

Ok - is me, the same guy as the prev email (on this thread) Ok. Somehow
it won't take my Google Login anymore - so had to create a new one.

Ok trying the bundle update here. And it seems to be doing something.
Will keep you informed.

Any article or such youc an point me to? Unfortunately I'm not the
programmer - that guy's left and gone and this is a legacy app I have to
pport. I'm a Support Kinda guy :-( So anything that could be useful for
me? links etc. Appreciate it.

And later, once it's done and running - we'll get some programmer to
check/extend/de-bug it for future work....

Thanx again. Appreciated.

Goan.

Frederick Cheung wrote in post #1175881:
--
Posted via http://www.ruby-forum.com/.

Colin Law

unread,
Jul 1, 2015, 9:40:14 AM7/1/15
to rubyonra...@googlegroups.com
On 1 July 2015 at 14:32, OPSPL Goan <li...@ruby-forum.com> wrote:
> Hi Fred,
>
> Ok - is me, the same guy as the prev email (on this thread) Ok. Somehow
> it won't take my Google Login anymore - so had to create a new one.
>
> Ok trying the bundle update here. And it seems to be doing something.
> Will keep you informed.

You should have copied Gemfile.lock from the working version, then used
bundle install
not bundle update. bundle install will install the versions that were
specified in Gemfile.lock. bundle update will update everything to
the latest version compatible with Gemfile, which is not the same
thing. Once you have it all working and in a version control system
such as git then you can update to later gems if you want/need to.

If you want to find out more about RoR then I suggest working through
a good tutorial such as railstutorial.org, which is free to use
online.

Colin

OPSPL Goan

unread,
Jul 1, 2015, 10:44:52 AM7/1/15
to rubyonra...@googlegroups.com
Hi Colin,

Tried that believe me. And I had the Gemfile.lock too. But it was
erroring. Bundle install used to work - but errors after that.

Now am using the bundle update (As Fred above suggested) and it's asking
for some ruby version changes - was 1.8.5 it asked to go to 1.9.2 for
nokogiri, then did that then now again asked to go to 1.9.3 as it's
asking for that for capybara....

So the update is still on and hopefully should work. I have no idea of
the quality of the original code to be (able to be) upgraded across
these versions etc. So Yes, plan to spend tomorrow reading-up on the
tutorial you suggest. Thanks Colin.

I don't want it in Git yet. I want it working on my stand-alone Ubuntu
LTS 14.2 server here first. Then will git it.

Coan.

Colin Law wrote in post #1175969:

Colin Law

unread,
Jul 1, 2015, 10:52:55 AM7/1/15
to rubyonra...@googlegroups.com
On 1 July 2015 at 15:44, OPSPL Goan <li...@ruby-forum.com> wrote:
> Hi Colin,
>
> Tried that believe me. And I had the Gemfile.lock too. But it was
> erroring. Bundle install used to work - but errors after that.
>
> Now am using the bundle update (As Fred above suggested) and it's asking
> for some ruby version changes - was 1.8.5 it asked to go to 1.9.2 for
> nokogiri, then did that then now again asked to go to 1.9.3 as it's
> asking for that for capybara....

I don't think Fred suggested that, but pointed out that you may have
problems using it.
Replace Gemfile.lock with the original and run bundle install again.
If you get errors then ask for the fix. By using update you will not
end up with the same gems as on Heroku and if it does not work you
will not know whether the problem may be due to the different gem
versions or something else.

>
> So the update is still on and hopefully should work. I have no idea of
> the quality of the original code to be (able to be) upgraded across
> these versions etc. So Yes, plan to spend tomorrow reading-up on the
> tutorial you suggest. Thanks Colin.
>
> I don't want it in Git yet. I want it working on my stand-alone Ubuntu
> LTS 14.2 server here first. Then will git it.

This is absolutely the wrong approach. Put the version exactly as it
was into git first, then get it working locally. That way you will be
able to track the changes you made and easily go back when you go up a
blind alley (such as running bundle update instead of bundle install).
Such exercises are exactly where a source control system is most
useful.

By the way, the convention on this list to to insert replies into the
previous message as I have done. That way it is easier to follow the
thread.

Colin

>
> Colin Law wrote in post #1175969:
>> On 1 July 2015 at 14:32, OPSPL Goan <li...@ruby-forum.com> wrote:
>>> Hi Fred,
>>>
>>> Ok - is me, the same guy as the prev email (on this thread) Ok. Somehow
>>> it won't take my Google Login anymore - so had to create a new one.
>>>
>>> Ok trying the bundle update here. And it seems to be doing something.
>>> Will keep you informed.
>>
>> You should have copied Gemfile.lock from the working version, then used
>> bundle install
>> not bundle update. bundle install will install the versions that were
>> specified in Gemfile.lock. bundle update will update everything to
>> the latest version compatible with Gemfile, which is not the same
>> thing. Once you have it all working and in a version control system
>> such as git then you can update to later gems if you want/need to.
>>
>> If you want to find out more about RoR then I suggest working through
>> a good tutorial such as railstutorial.org, which is free to use
>> online.
>>
>> Colin
>
> --
> Posted via http://www.ruby-forum.com/.
>
> --
> You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-ta...@googlegroups.com.
> To post to this group, send email to rubyonra...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/7b12dd84861c6fc2343ae818eba823c9%40ruby-forum.com.
> For more options, visit https://groups.google.com/d/optout.

OPSPL Goan

unread,
Jul 1, 2015, 12:02:10 PM7/1/15
to rubyonra...@googlegroups.com
Colin Law wrote in post #1175974:
Ok Got that. thanx. For the convention part. Will do.

Now about the coding thing - Ok am up a blind alley now. It upgraded
everything - but still won't run. no bundle errors... But well :-(

It asked for a config.rb file and such stuff :-( Said puma was not
available, etc etc... and then says this.....

20:56:07 wweb.1 | started with pid 3438
20:56:07 worker.1 | started with pid 3440
20:56:08 worker.1 |
/home/online/.rvm/gems/ruby-1.9.3-p551/gems/rake-0.8.7/lib/rake/alt_system.rb:32:
Use RbConfig instead of obsolete and deprecated Config.
20:56:08 wweb.1 |
/home/online/.rvm/gems/ruby-1.9.3-p551/gems/puma-2.11.3/lib/puma/dsl.rb:20:in
`read': No such file or directory - config/puma.rb (Errno::ENOENT)
20:56:08 wweb.1 | from
/home/online/.rvm/gems/ruby-1.9.3-p551/gems/puma-2.11.3/lib/puma/dsl.rb:20:in
`_load_from'
20:56:08 wweb.1 | from
/home/online/.rvm/gems/ruby-1.9.3-p551/gems/puma-2.11.3/lib/puma/dsl.rb:9:in
`block in load'
20:56:08 wweb.1 | from
/home/online/.rvm/gems/ruby-1.9.3-p551/gems/puma-2.11.3/lib/puma/dsl.rb:8:in
`tap'
20:56:08 wweb.1 | from
/home/online/.rvm/gems/ruby-1.9.3-p551/gems/puma-2.11.3/lib/puma/dsl.rb:8:in
`load'
20:56:08 wweb.1 | from
/home/online/.rvm/gems/ruby-1.9.3-p551/gems/puma-2.11.3/lib/puma/configuration.rb:35:in
`load'
20:56:08 wweb.1 | from
/home/online/.rvm/gems/ruby-1.9.3-p551/gems/puma-2.11.3/lib/puma/cli.rb:545:in
`parse_options'
20:56:08 wweb.1 | from
/home/online/.rvm/gems/ruby-1.9.3-p551/gems/puma-2.11.3/lib/puma/cli.rb:190:in
`run'
20:56:08 wweb.1 | from
/home/online/.rvm/gems/ruby-1.9.3-p551/gems/puma-2.11.3/bin/puma:10:in
`<top (required)>'
20:56:08 wweb.1 | from
/home/online/.rvm/gems/ruby-1.9.3-p551/bin/puma:23:in `load'
20:56:08 wweb.1 | from
/home/online/.rvm/gems/ruby-1.9.3-p551/bin/puma:23:in `<main>'
20:56:08 wweb.1 | from
/home/online/.rvm/gems/ruby-1.9.3-p551/bin/ruby_executable_hooks:15:in
`eval'
20:56:08 wweb.1 | from
/home/online/.rvm/gems/ruby-1.9.3-p551/bin/ruby_executable_hooks:15:in
`<main>'

Any thoughts. But tomorrow (is 9 PM here now so leaving for the day) - I
will do as you suggest - try getting down a clean copy, put it into git
and then try and slowly upgrade/build it.

Thanx for the attention.

Goan.

Colin Law

unread,
Jul 1, 2015, 12:05:52 PM7/1/15
to rubyonra...@googlegroups.com
On 1 July 2015 at 17:01, OPSPL Goan <li...@ruby-forum.com> wrote:
> ...
> Any thoughts. But tomorrow (is 9 PM here now so leaving for the day) - I
> will do as you suggest - try getting down a clean copy, put it into git
> and then try and slowly upgrade/build it.

Remember, bundle install not upgrade.

Colin

OPSPL Goan

unread,
Jul 2, 2015, 12:09:31 AM7/2/15
to rubyonra...@googlegroups.com
Colin Law wrote in post #1175982:
Thanx for the help. Appreciated. BTW, where are you? I'm in Goa (India)
- just so I can coord to your time-zones - and make the most of the
assistance you're so willingly offering Yes? Thank you again.

Ok. Got a latest copy from heroku. It does not run there anymore as the
bamboo stack's depreciated - so Yes, got it. Checked into
new-cedar-branch too - to avoid going "up the alley" again :-) All good.

Nothing's changed... Still errors...

With plain --> bundle install

$ foreman start
/home/online/.rvm/gems/ruby-1.8.7-p302@rails2310/gems/foreman-0.78.0/lib/foreman/process.rb:54:in
`run': undefined method `spawn' for Process:Module (NoMethodError)
from
/home/online/.rvm/gems/ruby-1.8.7-p302@rails2310/gems/foreman-0.78.0/lib/foreman/process.rb:53:in
`chdir'
from
/home/online/.rvm/gems/ruby-1.8.7-p302@rails2310/gems/foreman-0.78.0/lib/foreman/process.rb:53:in
`run'
from
/home/online/.rvm/gems/ruby-1.8.7-p302@rails2310/gems/foreman-0.78.0/lib/foreman/engine.rb:358:in
`spawn_processes'
from
/home/online/.rvm/gems/ruby-1.8.7-p302@rails2310/gems/foreman-0.78.0/lib/foreman/engine.rb:355:in
`upto'
from
/home/online/.rvm/gems/ruby-1.8.7-p302@rails2310/gems/foreman-0.78.0/lib/foreman/engine.rb:355:in
`spawn_processes'
from
/home/online/.rvm/gems/ruby-1.8.7-p302@rails2310/gems/foreman-0.78.0/lib/foreman/engine.rb:354:in
`each'
from
/home/online/.rvm/gems/ruby-1.8.7-p302@rails2310/gems/foreman-0.78.0/lib/foreman/engine.rb:354:in
`spawn_processes'
from
/home/online/.rvm/gems/ruby-1.8.7-p302@rails2310/gems/foreman-0.78.0/lib/foreman/engine.rb:57:in
`start'
from
/home/online/.rvm/gems/ruby-1.8.7-p302@rails2310/gems/foreman-0.78.0/lib/foreman/cli.rb:41:in
`start'
from
/home/online/.rvm/gems/ruby-1.8.7-p302@rails2310/gems/thor-0.19.1/lib/thor/command.rb:27:in
`__send__'
from
/home/online/.rvm/gems/ruby-1.8.7-p302@rails2310/gems/thor-0.19.1/lib/thor/command.rb:27:in
`run'
from
/home/online/.rvm/gems/ruby-1.8.7-p302@rails2310/gems/thor-0.19.1/lib/thor/invocation.rb:126:in
`invoke_command'
from
/home/online/.rvm/gems/ruby-1.8.7-p302@rails2310/gems/thor-0.19.1/lib/thor.rb:359:in
`dispatch'
from
/home/online/.rvm/gems/ruby-1.8.7-p302@rails2310/gems/thor-0.19.1/lib/thor/base.rb:440:in
`start'
from
/home/online/.rvm/gems/ruby-1.8.7-p302@rails2310/gems/foreman-0.78.0/bin/foreman:7
from
/home/online/.rvm/gems/ruby-1.8.7-p302@rails2310/bin/foreman:19:in
`load'
from
/home/online/.rvm/gems/ruby-1.8.7-p302@rails2310/bin/foreman:19
from
/home/online/.rvm/gems/ruby-1.8.7-p302@rails2310/bin/ruby_executable_hooks:15
online@online-Virtual-Machine:~/kacstbook-engage$

Any ideas? Anything I can try :-(

OPSPL Goan

unread,
Jul 2, 2015, 12:56:02 AM7/2/15
to rubyonra...@googlegroups.com
OPSPL Goan wrote in post #1176005:
> Colin Law wrote in post #1175982:
>> On 1 July 2015 at 17:01, OPSPL Goan <li...@ruby-forum.com> wrote:
>>> ...
>>> Any thoughts. But tomorrow (is 9 PM here now so leaving for the day) - I
>>> will do as you suggest - try getting down a clean copy, put it into git
>>> and then try and slowly upgrade/build it.
>>
>> Remember, bundle install not upgrade.
>>
>> Colin
>
> Thanx for the help. Appreciated. BTW, where are you? I'm in Goa (India)
> - just so I can coord to your time-zones - and make the most of the
> assistance you're so willingly offering Yes? Thank you again.
>
> Ok. Got a latest copy from heroku. It does not run there anymore as the
> bamboo stack's depreciated - so Yes, got it. Checked into
> new-cedar-branch too - to avoid going "up the alley" again :-) All good.
>
> Nothing's changed... Still errors...
>
> With plain --> bundle install - it bundles. No errors. But still won't
> run.
1. Foreman looked like it was out of sync - so changed version.
Was getting this error ==> https://github.com/ddollar/foreman/issues/473
Now.
foreman --version
0.61.0
*** That seems better.

2. Then is asked for puma. So included that in the Gemfile. and had to
make a puma.rb file in config dir.
Used info from here:
http://stackoverflow.com/questions/29923026/how-to-deploy-michael-hartls-rails-tutorial-app-on-heroku-using-puma
Is this correct?

3. Now it gives another error :-(
$ foreman start
10:18:21 web.1 | started with pid 5846
10:18:21 web.1 | [5847] Puma starting in cluster mode...
10:18:21 web.1 | [5847] * Version 2.11.3 (ruby 1.8.7-p302), codename:
Intrepid Squirrel
10:18:21 web.1 | [5847] * Min threads: 5, max threads: 5
10:18:21 web.1 | [5847] * Environment: development
10:18:21 web.1 | [5847] * Process workers: 2
10:18:21 web.1 | [5847] * Preloading application
10:18:21 web.1 | [5847] ERROR: No application configured, nothing to
run
10:18:21 web.1 | exited with code 1
10:18:21 system | sending SIGTERM to all processes
SIGTERM received
$

:-(

G.

Mike

unread,
Jul 2, 2015, 6:13:30 AM7/2/15
to rubyonra...@googlegroups.com
Don't believe you can use preload_app! with Rails 2, by 1.87

Comment that out, and also the section about the worker.on_boot as I am fairly sure that won't work either

OPSPL Goan

unread,
Jul 2, 2015, 9:45:35 AM7/2/15
to rubyonra...@googlegroups.com
Mike S. wrote in post #1176022:
> Don't believe you can use preload_app! with Rails 2, by 1.87
>
> Comment that out, and also the section about the worker.on_boot as I am
> fairly sure that won't work either

Still the same error...

$ foreman start
19:13:05 web.1 | started with pid 10007
19:13:06 web.1 | [10008] Puma starting in cluster mode...
19:13:06 web.1 | [10008] * Version 2.11.3 (ruby 1.8.7-p302), codename:
Intrepid Squirrel
19:13:06 web.1 | [10008] * Min threads: 5, max threads: 5
19:13:06 web.1 | [10008] * Environment: development
19:13:06 web.1 | [10008] * Process workers: 2
19:13:06 web.1 | [10008] * Phased restart available
19:13:06 web.1 | [10008] ERROR: No application configured, nothing to
run
19:13:06 web.1 | exited with code 1
19:13:06 system | sending SIGTERM to all processes
SIGTERM received
$

Suggestions? For stuff to try?

Goan.

Hassan Schroeder

unread,
Jul 2, 2015, 10:41:13 AM7/2/15
to rubyonrails-talk
On Thu, Jul 2, 2015 at 6:44 AM, OPSPL Goan <li...@ruby-forum.com> wrote:

> Suggestions? For stuff to try?

Yes. Hire someone who knows what they're doing.

Seriously, this is like watching someone try to remove their own
appendix reading "Abdominal Surgery for Dummies." It can't be
an effective use of your (or anyone else's) time.

Failing that, stop trying to run the app; leave foreman, puma, etc.
out of the picture and try running the tests. And use `bundle exec`
to insure you're using the Gemfile-specified versions.

(P.S. The immediate error
ERROR: No application configured, nothing to run
probably means there's no config.ru file in the main directory.)

Good luck.
--
Hassan Schroeder ------------------------ hassan.s...@gmail.com
http://about.me/hassanschroeder
twitter: @hassan
Consulting Availability : Silicon Valley or remote

OPSPL Goan

unread,
Jul 2, 2015, 11:02:41 AM7/2/15
to rubyonra...@googlegroups.com
Hassan Schroeder wrote in post #1176048:
> On Thu, Jul 2, 2015 at 6:44 AM, OPSPL Goan <li...@ruby-forum.com> wrote:
>
>> Suggestions? For stuff to try?
>
> Yes. Hire someone who knows what they're doing.
>


You wanna try? I can send you the stuff..... Basically need it ported
off heroku for a friend that would like to run it all on a cloud server.

What'd it cost?

Let me know. And Yes was trying the abdominal surgery for dummies - as
there isn't anyone here that could/can handle it. Remember the guy in
Antarctica that did just that :-D - Not coz he was surrounded by
hospitals and doctors. obviously coz he wasn't!!!! :-(

Hassan Schroeder

unread,
Jul 2, 2015, 12:08:17 PM7/2/15
to rubyonrails-talk
On Thu, Jul 2, 2015 at 8:01 AM, OPSPL Goan <li...@ruby-forum.com> wrote:

>> Yes. Hire someone who knows what they're doing.
>
> You wanna try? I can send you the stuff..... Basically need it ported
> off heroku for a friend that would like to run it all on a cloud server.

OK, let's back up a second.

Why did this application need to be "ported off heroku" in the first
place? Because *no one was maintaining it.*

I wouldn't get this running somewhere else without upgrading it to
supported versions of Ruby/Rails/etc. and having an agreement in
place for at least handling security updates.

And if your friend doesn't understand the point of this, someone
needs to educate him or her :-)

FWIW,

OPSPL Goan

unread,
Jul 3, 2015, 1:58:39 AM7/3/15
to rubyonra...@googlegroups.com
Hassan Schroeder wrote in post #1176058:
> On Thu, Jul 2, 2015 at 8:01 AM, OPSPL Goan <li...@ruby-forum.com> wrote:
>
>>> Yes. Hire someone who knows what they're doing.
>>
>> You wanna try? I can send you the stuff..... Basically need it ported
>> off heroku for a friend that would like to run it all on a cloud server.
>
> OK, let's back up a second.
>
> Why did this application need to be "ported off heroku" in the first
> place? Because *no one was maintaining it.*
>

Not exactly. Mainly coz they now have their own company server and they
would like all their company apps on that server. Easier to maintain in
one place etc. And Yes, the original developer is *Not available* to
them anymore. So that's also an issue.

> I wouldn't get this running somewhere else without upgrading it to
> supported versions of Ruby/Rails/etc.

It isn't happening on heroku and frankly I can't really be bothered as
then they're still stuck to that platform. I'd prefer to get it running
stand-alone on a Ubuntu box. So then we can migrate it to their own
server.

> and having an agreement in
> place for at least handling security updates.
>

All in good time. It's gotta work first. Isn't working on heroku
as-of-now and isn't working anywhere else either :-( It is working code
though Ok.

> And if your friend doesn't understand the point of this, someone
> needs to educate him or her :-)
>

We work kinda differently here... ;-) We'll get it working,
up-and-running, then discuss what needs to be done for the future... For
now - just trying to get it past first-base to see that it *can run* on
a stand-alone webserver and isn't too tightly bound to the heroku stuff.
See?

So, again - any help is appreciated. Constructive criticism is too. ;-)
You even been to Goa (India)? I you haven't you must visit - it'll
improve your disposition :-D

Goan.

Mike Simkins

unread,
Jul 3, 2015, 9:23:04 AM7/3/15
to rubyonra...@googlegroups.com
So, this is all because of the Heroku Bamboo retirement (for which there
was a years notice anyway)

Bamboo had pre-installed gems that will be needed to be added to your
Gemfile, with explicit versions

Current secure (or semi secure anyway) gems will not target ruby 1.8.7
(Heroku actually used the patched REE versions)

The fact that this is still running on Rails 2 (which has been out of
support since June 2013), together with ruby 1.8.7 which went end of
(extended) support in July 2014, means that you will have a hard time
getting it to run now on a modern stack.

Also, if you are no longer hosting on Heroku, the deployment method will
need to change (you cant just git push to the server, and hope it will
ok - although there is the dokku project that used heroku buildpacks,
but the only supported one there is Ceder)

Depending on if it can be classified as open source (in which case you
could get some free help), or closed-source (in which case you will
probably need to pay consultants under an NDA), you may be able to
upgrade to a supported version (which will basically be Rails 4 or
higher, as 3.2 will go end of support when Rails 5 is released in a
couple of months), depending on the apps complexity, it may actually be
worth rewriting it entirely from scratch. If you can host the code
somewhere (either Github if it is open-source), or somewhere like
Gitlab, or BitBucket if it is closed source (unless you want to pay
Github for private repos), and then ask if anyone is prepared to help
you fix it.

Sorry if this seems negative, but it is probably realistic.

OPSPL Goan

unread,
Jul 6, 2015, 4:24:04 AM7/6/15
to rubyonra...@googlegroups.com
Yes I know. I'd wanted to do it earlier - but there were delays - you
can imagine :-( Not mine. But they needed to get funding to do it and
then admin delays, etc etc....

Any info I can read-up on this anywhere? I have a couple of programmers
here that will be working on it - but I need to give them something
(they can hope) to work on. Huh? As of now - it isn't working and I need
it doing that at least.
* Basically info on how I could port this (legacy?) code to run on a
rails 4 system.

Yes, the plan is to get it off any of the platforms. Host it on a clean
Linux-Ruby-Rails Server. Virtual for that itself.

It's closed-source. Stuff owned by the people we're doing it for. So
well, Looks like we'll have to upgrade it to Rails 4. And I'll have to
find someone to do it. Know anyone who can try?

And Yes, thanx for the realistic answer. That was a real help. Any more
thoughts let me know.

Thanx again, Mike.

Colin Law

unread,
Jul 6, 2015, 4:37:50 AM7/6/15
to rubyonra...@googlegroups.com
On 6 July 2015 at 09:23, OPSPL Goan <li...@ruby-forum.com> wrote:
> Yes I know. I'd wanted to do it earlier - but there were delays - you
> can imagine :-( Not mine. But they needed to get funding to do it and
> then admin delays, etc etc....
>
> Any info I can read-up on this anywhere? I have a couple of programmers
> here that will be working on it - but I need to give them something
> (they can hope) to work on. Huh? As of now - it isn't working and I need
> it doing that at least.
> * Basically info on how I could port this (legacy?) code to run on a
> rails 4 system.
>
> Yes, the plan is to get it off any of the platforms. Host it on a clean
> Linux-Ruby-Rails Server. Virtual for that itself.
>
> It's closed-source. Stuff owned by the people we're doing it for. So
> well, Looks like we'll have to upgrade it to Rails 4. And I'll have to
> find someone to do it. Know anyone who can try?

Get it working on the existing version of Rails first. Then upgrade it.

Colin

OPSPL Goan

unread,
Jul 6, 2015, 4:50:07 AM7/6/15
to rubyonra...@googlegroups.com
Colin Law wrote in post #1176179:
I totally agree Colin. But how....? That's the question. Nothing I do is
working. Any pointers?

I have a fully set-up Ubuntu 14 LTS Server here. With Ruby/rails/etc.
Total. But it just don't like the code....

OPSPL Goan

unread,
Jul 6, 2015, 5:18:45 AM7/6/15
to rubyonra...@googlegroups.com
OPSPL Goan wrote in post #1176180:
See below:
$ foreman start
14:45:34 web.1 | started with pid 15163
14:45:35 web.1 | [15164] Puma starting in cluster mode...
14:45:35 web.1 | [15164] * Version 2.11.3 (ruby 1.8.7-p302), codename:
Intrepid Squirrel
14:45:35 web.1 | [15164] * Min threads: 5, max threads: 5
14:45:35 web.1 | [15164] * Environment: development
14:45:35 web.1 | [15164] * Process workers: 2
14:45:35 web.1 | [15164] * Phased restart available
14:45:35 web.1 | [15164] ERROR: No application configured, nothing to
run
14:45:35 web.1 | exited with code 1
14:45:35 system | sending SIGTERM to all processes
SIGTERM received
$

I even got it running with the ruby 1.8.7-p302. But it won't run :-(

What am I missing?

Colin Law

unread,
Jul 6, 2015, 5:25:04 AM7/6/15
to rubyonra...@googlegroups.com
You will need to engage someone with at least a basic understanding of
Rails I think. I am not available. I am sure contractors are
available. Someone here will suggest where to look I am sure, or
google for Ruby Rails Contractor. Alternatively train someone up
in-house.

Colin

Hassan Schroeder

unread,
Jul 6, 2015, 7:55:02 AM7/6/15
to rubyonrails-talk
On Mon, Jul 6, 2015 at 2:18 AM, OPSPL Goan <li...@ruby-forum.com> wrote:

>>> Get it working on the existing version of Rails first. Then upgrade it.

>> I totally agree Colin. But how....? That's the question. Nothing I do is
>> working. Any pointers?

Why ask for "pointers" if you're going to ignore them? You're still
apparently trying to run this command

> $ foreman start

when I gave you a suggestion to get more useful error messages
some time ago. Did you try that? What was the result?

OPSPL Goan

unread,
Jul 6, 2015, 8:43:36 AM7/6/15
to rubyonra...@googlegroups.com
Hassan Schroeder wrote in post #1176191:
>
> when I gave you a suggestion to get more useful error messages
> some time ago. Did you try that? What was the result?

I wish it would.... :-( (give more useful error msgs)......

That's all it does too:

$ bundle exec
bundler: exec needs a command to run
$

I appreciate you taking the time - but can you point me to something
that will explain what I'm trying to do and maybe how to do it. It is my
first time with RoR I agree - but I've handled pretty-much everything
else. Ok? And this can't be rocket science. So at the risk of repeating
myself "Any pointers?"

Hassan Schroeder

unread,
Jul 6, 2015, 9:22:34 AM7/6/15
to rubyonrails-talk
On Mon, Jul 6, 2015 at 5:42 AM, OPSPL Goan <li...@ruby-forum.com> wrote:

>> when I gave you a suggestion to get more useful error messages
>> some time ago. Did you try that? What was the result?

> $ bundle exec
> bundler: exec needs a command to run
> $

To recap, I said:

> Failing that, stop trying to run the app; leave foreman, puma, etc.
> out of the picture and try running the tests. And use `bundle exec`
> to insure you're using the Gemfile-specified versions.
>
> (P.S. The immediate error
> ERROR: No application configured, nothing to run
> probably means there's no config.ru file in the main directory.)

The main point was to RUN THE TESTS. And using `bundle exec`
does, yes, imply using it to run a command, but since I can't see
your app I can't say what kind of tests it has, and hence what that
command would be.

After you tried `bundle exec` by itself, did you read up on bundler?
Try running `bundle --help` or similar? Did you look for instructions
on running tests in Rails? Did you check for a config.ru file?

> I appreciate you taking the time - but can you point me to something
> that will explain what I'm trying to do and maybe how to do it.

No. There is no substitute for understanding Ruby and Rails enough
to work through whatever is going on. Without a certain baseline level
of knowledge you're just spinning your wheels, as shown above.

Sorry.

OPSPL Goan

unread,
Jul 6, 2015, 12:21:53 PM7/6/15
to rubyonra...@googlegroups.com
> No. There is no substitute for understanding Ruby and Rails enough
> to work through whatever is going on. Without a certain baseline level
> of knowledge you're just spinning your wheels, as shown above.
>
> Sorry.
>

Y'know Hassan,

I've worked with computers and IT for as long as I can remember - and
that's a long time. Mostly with Windows (of late) and had my fair share
of other OSs too - from DOS & Unix to Linux.... But it's at times like
these that I know why I really prefer M$ Products...

If it was some noob asking me the same questions, I'd have been able to
point her/him to something lke this -->
https://www.youtube.com/watch?v=GPK9MGjhbhI and hope for the best. And
they probably would have stumbled around and found their way. Maybe even
been able to get it up and running :-)

You kinda guys with your cryptic answers is what makes it all the more
difficult. Obviously I'm looking for some silver bullet. And there is I
know. Not been around so long that everything's gotta be done the hard
way see. So anyways....

Thanx for the help. Your confidence in the ability of others to figure
out stuff they don't yet know is applaudable. I'm headed off this forum.
Back to where I can figure it out with people that don't need to make
every set-up into a "trial by fire - rite of passage"... Thanx.

And Colin, sincere thanks you did try. But maybe in future - if you
thought more like M$, it'd make the world a better place. There is a
quick and fast (and yes dirty) way to get stuff going. Not everything's
gotta be perfect and "As it should be" see...

Au revoir....!

Norm Scherer

unread,
Jul 6, 2015, 10:02:39 PM7/6/15
to rubyonra...@googlegroups.com
If I were doing the job I would first get it running in my system with rails 2.3.18 (the last rails 2 version) and then upgrade it.  The easiest way to get it running with rails 2.3.18 would be to install a 10.4 LTS system (which is of the same vintage) then install rubygems (probably version 1.4) then 'gem install rails --version 2.3.18' and then 'rake gems:install' in your app directory.  Take a look at Agile Rails edition 2 for help.  After you have it running and all of the tests running you are ready to explore upgrading.

JMHO
Norm

OPSPL Goan

unread,
Jul 7, 2015, 2:47:26 AM7/7/15
to rubyonra...@googlegroups.com
Norm Scherer wrote in post #1176272:
> If I were doing the job I would first get it running in my system with
> rails 2.3.18 (the last rails 2 version) and then upgrade it. The
> easiest way to get it running with rails 2.3.18 would be to install a
> 10.4 LTS system (which is of the same vintage) then install rubygems
> (probably version 1.4) then 'gem install rails --version 2.3.18' and
> then 'rake gems:install' in your app directory. Take a look at Agile
> Rails edition 2 for help. After you have it running and all of the
> tests running you are ready to explore upgrading.
>
> JMHO
> Norm

Thanx Norm,

That makes so much more sense. Yes - gonna try that and will keep you
posted.

Thanx again. Finally someone with some sensible suggestion - whew -
thanx!!!

Elizabeth McGurty

unread,
Jul 7, 2015, 1:30:10 PM7/7/15
to rubyonra...@googlegroups.com
That's not really very nice: "Finally someone with some sensible suggestion - whew - "

Folks stick their neck (name) out here to make suggestions...

OPSPL Goan

unread,
Jul 7, 2015, 3:02:44 PM7/7/15
to rubyonra...@googlegroups.com
Elizabeth McGurty wrote in post #1176321:
Sorry you didn't like that. Believe me I'm not that-a-ways either.

Read the whole thread. I've been here days trying to get "someone with
some ideas of what I could/should try just point me in the right
direction". I'm not asking them for a step-by-step what to do - just
where to start looking? What'm I doing wrong? Is that too much to ask on
this forum?

And all I get is guys telling me that I don't know what I'm doing and
need to hire someone to do it. When I ask if anyone's willing - no one
is! Then they say I don't have enough knowledge to get the task done -
why'd I be on a forum "asking questions" if I did have the knowledge.

I'm part of many forums - where I do help people - been doing it for
years - and I've even given some examples of what kinda stuff I'd
expect. Ok. Not a youtube video answering my (yes I agree fairly complex
requirement)questions... But gimme a break - I gotta get the job done,
don't need to learn the whole science behind RoR - Just need to get
working code (agreed legacy one) - up and running!!!

Is it too much to ask? On a forum for RoR?

So yes, that was really the first sensible answer. The rest were all the
"you gotta master the technology and know it all" before you can get it
up and running - kind. Not very useful see - to a lowly SysAdmin -
trying to get the stuff "just up and running" for the team of
programmers to take over and work on it - from there.

Long answer - Yes.... Apologies if I upset anyone.... But Man am I
pi**ed!!!!

G

Colin Law

unread,
Jul 7, 2015, 3:55:11 PM7/7/15
to rubyonra...@googlegroups.com
On 7 July 2015 at 20:01, OPSPL Goan <li...@ruby-forum.com> wrote:
> ..
> Read the whole thread. I've been here days trying to get "someone with
> some ideas of what I could/should try just point me in the right
> direction". I'm not asking them for a step-by-step what to do - just
> where to start looking? What'm I doing wrong? Is that too much to ask on
> this forum?

Hassan made two suggestions that as far as I can see (unless I have
missed it) you have not responded to.

1. Start by running the tests that hopefully the developer provided
with the app.

2. Check that the file config.ru exists in the root directory of the app.

Colin

OPSPL Goan

unread,
Jul 8, 2015, 2:11:08 AM7/8/15
to rubyonra...@googlegroups.com
Colin Law wrote in post #1176330:
> On 7 July 2015 at 20:01, OPSPL Goan <li...@ruby-forum.com> wrote:
>> ..
>> Read the whole thread. I've been here days trying to get "someone with
>> some ideas of what I could/should try just point me in the right
>> direction". I'm not asking them for a step-by-step what to do - just
>> where to start looking? What'm I doing wrong? Is that too much to ask on
>> this forum?
>
> Hassan made two suggestions that as far as I can see (unless I have
> missed it) you have not responded to.
>

Yes I agree. But I also asked where and for someone who (very-obviously)
is not familiar where to look ......

> 1. Start by running the tests that hopefully the developer provided
> with the app.
>

I don't know even where to look for this. Like if I was guiding someone
on a Dotnet aspx IIS Server set-up I'd be saying "take this test page -
put it in your default-web directory - run it and see what output you
get etc."... See?

> 2. Check that the file config.ru exists in the root directory of the
> app.
>

I told him it didn't. And...? What do I do now. Again for example had
someone asked me a similar qn for the IIS Platform, I'd have given a
sample/default web.config file. Asked them to put it into the
default-web directory - run it and see what output you get etc."... See?

For a first-time RoR SysAdmin - where do i start. And sadly the
documentation too is not really very helpful.

So:

1. What tests should I be running? And where would they be - or should I
look for them? I told you we have no access to the original programmer.
:-(

2. Can anyone give me a sample of a config.ru.

Thanx guys... Looks like we're getting somewhere now....

Colin Law

unread,
Jul 8, 2015, 4:01:38 AM7/8/15
to rubyonra...@googlegroups.com
On 8 July 2015 at 07:10, OPSPL Goan <li...@ruby-forum.com> wrote:
> Colin Law wrote in post #1176330:
>> On 7 July 2015 at 20:01, OPSPL Goan <li...@ruby-forum.com> wrote:
>>> ..
>>> Read the whole thread. I've been here days trying to get "someone with
>>> some ideas of what I could/should try just point me in the right
>>> direction". I'm not asking them for a step-by-step what to do - just
>>> where to start looking? What'm I doing wrong? Is that too much to ask on
>>> this forum?
>>
>> Hassan made two suggestions that as far as I can see (unless I have
>> missed it) you have not responded to.
>>
>
> Yes I agree. But I also asked where and for someone who (very-obviously)
> is not familiar where to look ......
>
>> 1. Start by running the tests that hopefully the developer provided
>> with the app.
>>
>
> I don't know even where to look for this.

Google would have helped, also the Rails Guides cover testing (and
pretty much everything else).

The tests should be in the test folder of the application.
How to run then will depend to some extent on the sort of tests the
developer provided. You could try
rake db:test:prepare
which should create the test database, then
bundle exec rake test
but as I said it will depend on the sort of tests the developer provided.

> Like if I was guiding someone
> on a Dotnet aspx IIS Server set-up I'd be saying "take this test page -
> put it in your default-web directory - run it and see what output you
> get etc."... See?
>
>> 2. Check that the file config.ru exists in the root directory of the
>> app.
>>
>
> I told him it didn't. And...? What do I do now.

I suppose you could create a new rails app using the version of rails
that your app uses and use the config.ru from that.

Colin

Colin Law

unread,
Jul 8, 2015, 9:39:35 AM7/8/15
to rubyonra...@googlegroups.com
On 8 July 2015 at 07:10, OPSPL Goan <li...@ruby-forum.com> wrote:
> Colin Law wrote in post #1176330:
>> ...
>> 1. Start by running the tests that hopefully the developer provided
>> with the app.
>>
>
> I don't know even where to look for this. Like if I was guiding someone
> on a Dotnet aspx IIS Server set-up I'd be saying "take this test page -
> put it in your default-web directory - run it and see what output you
> get etc."... See?

On a slightly different tack, I believe you said that after you get
the app basically working you would pass it to programmers to
maintain. Rather than getting it running, then organising training
for the programmers, then passing it over to them, you might be better
to get the programmers trained first, then get the app going with
their help. Many of the questions you have been asking are ones that
they would know the answer to.

Colin

Matt Jones

unread,
Jul 9, 2015, 5:54:09 PM7/9/15
to rubyonra...@googlegroups.com


On Monday, 6 July 2015 12:21:53 UTC-4, Ruby-Forum.com User wrote:
> No. There is no substitute for understanding Ruby and Rails enough
> to work through whatever is going on. Without a certain baseline level
> of knowledge you're just spinning your wheels, as shown above.
>
> Sorry.
>

Y'know Hassan,

I've worked with computers and IT for as long as I can remember - and
that's a long time. Mostly with Windows (of late) and had my fair share
of other OSs too - from DOS & Unix to Linux.... But it's at times like
these that I know why I really prefer M$ Products...

If it was some noob asking me the same questions, I'd have been able to
point her/him to something lke this -->
https://www.youtube.com/watch?v=GPK9MGjhbhI and hope for the best. And
they probably would have stumbled around and found their way. Maybe even
been able to get it up and running :-)

You kinda guys with your cryptic answers is what makes it all the more
difficult. Obviously I'm looking for some silver bullet. And there is I
know. Not been around so long that everything's gotta be done the hard
way see. So anyways....


There is a silver bullet. LEARN HOW TO USE THE THING, OR HIRE SOMEBODY WHO KNOWS WHAT THEY ARE DOING. Expecting people to help you when you don't understand what you're fiddling with is like standing beside your car with a flat tire and demanding a "silver bullet" to make up for your lack of a wrench and a jack.

 
Thanx for the help. Your confidence in the ability of others to figure
out stuff they don't yet know is applaudable. I'm headed off this forum.
Back to where I can figure it out with people that don't need to make
every set-up into a "trial by fire - rite of passage"... Thanx.

And Colin, sincere thanks you did try. But maybe in future - if you
thought more like M$, it'd make the world a better place. There is a
quick and fast (and yes dirty) way to get stuff going. Not everything's
gotta be perfect and "As it should be" see...

BTW, I've got a Windows 1.0 app that I need to recompile for Windows 10. I need you to tell me the "silver bullet" to make all the compilation errors go away. It doesn't need to be "as it should be", but a way SURELY exists, right? 

--Matt Jones

Elizabeth McGurty

unread,
Jul 10, 2015, 3:11:00 PM7/10/15
to rubyonra...@googlegroups.com
Has this set of messages been hacked?  I see my name and messages that I do not understand?

Colin Law

unread,
Jul 10, 2015, 5:02:55 PM7/10/15
to rubyonra...@googlegroups.com
On 10 July 2015 at 20:11, Elizabeth McGurty <emcg...@gmail.com> wrote:
> Has this set of messages been hacked? I see my name and messages that I do
> not understand?

Since you have not posted the offending text it is difficult for us to comment.

More likely someone has just got the quoting mixed up, or is that not
what you mean?

Colin

Taras Matsyk

unread,
Jul 12, 2015, 5:38:35 AM7/12/15
to rubyonra...@googlegroups.com
Hi OPSPL Goan,

drop me a message, I can take a look on that app.

OPSPL Goan

unread,
Jul 13, 2015, 4:40:51 AM7/13/15
to rubyonra...@googlegroups.com
Taras Matsyk wrote in post #1176487:
> Hi OPSPL Goan,
>
> drop me a message, I can take a look on that app.

Can't seem to drop you the msg.

Mail me at online(dot)goa(AT)gmail.com Ok.

Where are you based and what kind of charges are you looking at?

G
Reply all
Reply to author
Forward
0 new messages