I'm attempting to run a legacy Rails App using Rails 3.2.8 with Ruby 1.9.3:551 through RVM. I'm aiming to run it using Apache2 with Passenger as well.
Attempting to connect to the site leads to a Passenger error site. Looking through the logs, the issue seems to be with precompiling my assets. When I run bundle exec rake assets:precompile --trace, I get the error
**Invoke assets:precompile:all (first_time)
...
**Invoke tmp:cache:clear (first_time)
**Execute tmp:cache:clear
**Excute assets:precompile:primary
[ddtrace] (/usr/local/rvm/gems/ruby-1.9.3-p551/gems/ddtrace-0.26.0/lib/ddtrace/transport/http/clinet.rb:46:in 'rescue in send_request' Internal error during HTTP transport request. Cause: Connection refused - connect(2) Location: /usr/local/rvm/rubies/ruby-1.9.3-p551/lib/ruby/1.9.1/net/http.rb:763:in 'initialize'
...
What could be causing this issue? I can't seem to find anything about it in ddtrace documentation.
Related
I've recently updated an old application to from 3.2.13 to 4.2.10. I've got the application running in development mode but any rake or rails commands I try to run just hang/freeze. The terminal window will hang for a second and then nothing, I'm unable to even stop the process with ctrl-c. I've read a lot about running 'spring stop' to fix this but I don't have spring installed on this app.
Running the commands with --trace aren't particularly helpful.
rails generate model Foo --trace gives me nothing and rake db:migrate --trace gives me:
** Invoke db:load_config (first_time)
** Execute db:load_config
** Execute db:migrate
before freezing. Any pointers in the right direction would be appreciated.
Okay so time after time we've all seen question about Rake assets:precompile error. I've tried multiple methods, I looked at the following SO question Ruby on Rails Rake assets:precompile error and tried multiple methods of even doing the following: config.assets.compile = true and then running rake assets:precompile --trace RAILS_ENV=production. However I noticed that when I tried to do the following:
rake assets:precompile RAILS_ENV=production I got the following error:
rake aborted!
CScript Error: Execution of the Windows Script Host failed. (0x800A0007)
C:\Users\home\Desktop>cd MIUK_Portal
C:\Users\home\Desktop\MIUK_Portal>rake assets:precompile
RAILS_ENV=production C:/RailsInstaller/Ruby1.9.3/bin/ruby.exe
C:/RailsInstaller/Ruby1.9.3/bin/rake assets:precompile:all
RAILS_ENV=production RAILS_GROUPS=assets rake aborted! 795: unexpected
token at
'C:\Users\home\AppData\Local\Temp\execjs20121221-5484-1atk9yx.js(2, 3)
Microsoft JScript runtime error: Out of memory
' (in
C:/Users/home/Desktop/MIUK_Portal/app/assets/javascripts/application.js)
Tasks: TOP => assets:precompile:primary (See full trace by running
task with --trace) rake aborted! Command failed with status (1):
[C:/RailsInstaller/Ruby1.9.3/bin/ruby.exe C...]
Tasks: TOP => assets:precompile (See full trace by running task with
--trace)
Has anyone encountered this issue? How do you overcome this?
Update
Okay apparently from looking at the error it clearly is stating that
:\Users\home\AppData\Local\Temp\execjs20121221-5484-1atk9yx.js(2, 3)
Microsoft JScript runtime error: Out of memory
So I'm now wondering how to resolve this? Any ideas? Further to this I noticed that someone did encounter the similar issue: CS Script issue but this was unresolved:
So I am asking if anyone out there has had the same issue.
This was what I did, and it worked for me. I installed node.js first in my system, and then ran the following command bundle exec rake assets:precompile.
I was able to solve this issue by transferring the project into a Linux environment (Ubuntu) and running the bundle exec rake assets:precompile. It appeared to work, I believe this sort of issue is something to do with windows. If starting any kind of development to do with RoR stick to Linux.
jQuery validation is working locally, but it doesn't on Heroku.
There is no errors about it in console. What should I do ?
EDITED
den#DENYS /D/myapp (master)
$ RAILS_ENV=production bundle exec rake assets:precompile
c:/Ruby192/bin/ruby.exe c:/Ruby192/bin/rake assets:precompile:all RAIL
uction RAILS_GROUPS=assets
rake aborted!
Access denied for user 'root'#'localhost' (using password: NO)
Tasks: TOP => environment
(See full trace by running task with --trace)
rake aborted!
Command failed with status (1): [c:/Ruby192/bin/ruby.exe c:/Ruby192/bi
Tasks: TOP => assets:precompile
(See full trace by running task with --trace)
Have you precompiled your assets before pushing to heroku?
RAILS_ENV=production bundle exec rake assets:precompile
You can find more information here.
If it doesn't solve your problem, please provide the heroku logs in your question.
I'm unable to get rake precompile tasks running with Rails 3.1.3. I get the following error:
$ rake assets:precompile --trace
** Invoke assets:precompile (first_time)
** Execute assets:precompile
/Users/tristankromer/.rvm/rubies/ruby-1.9.2-p290/bin/ruby /Users/tristankromer/.rvm/gems/ruby-1.9.2-p290#toomanyninjas/bin/rake assets:precompile:all RAILS_ENV=production RAILS_GROUPS=assets --trace
** Invoke assets:precompile:all (first_time)
** Execute assets:precompile:all
** Invoke assets:precompile:primary (first_time)
** Invoke assets:environment (first_time)
** Execute assets:environment
rake aborted!
Application has been already initialized.
/Users/tristankromer/.rvm/gems/ruby-1.9.2-p290#toomanyninjas/gems/railties-3.1.3/lib/rails/application.rb:95:in `initialize!'
Same thing happens when I used bundle exec or when I deploy to heroku cedar stack.
Not quite sure where to start on this one. Any ideas?
UPDATE: I'm having issues with every rake task:
rake aborted!
Application has been already initialized.
/Users/tristankromer/.rvm/gems/ruby-1.8.7-p249#joke-off/gems/railties-3.1.3/lib/rails/application.rb:95:in `initialize!'
Upgrading rake to 0.9.2.2 and using ruby 1.9.2-p290 seems to have fixed the issue.
I had this issue, I didn't want to upgrade ruby, and what ended up working for me was the renaming config.ru in RAILS_ROOT to config.ru.bak
http://code.google.com/p/phusion-passenger/issues/detail?id=109
I came across this after realizing I was having an issue getting Passenger to recognize the "RailsEnv" setting my my virtual hosts conf
I had this problem on Rails 3.2.6
The reason it was happening had to do with a path linked gem having a bundle folder. in my gemfile
like so:
gem 'some-gem', :path => "vendor/some-gem"
In order to fix the issue I just moved the bundle folder out of the path linked gem.
mv vendor/some-gem/bundle ~
Once the bundle file was gone it worked perfectly
Ok so i have two rails application on my server and both apps use thinking sphinx and all seems good with one app. when i do
rake ts:start RAILS_ENV=production
Started successfully (pid 9943).
but when i do it on the other app i get
rake ts:start RAILS_ENV=production --trace
** Invoke ts:start (first_time)
** Invoke thinking_sphinx:start (first_time)
** Invoke thinking_sphinx:app_env (first_time)
** Execute thinking_sphinx:app_env
** Invoke environment (first_time)
** Execute environment
Jammit Warning: Asset compression disabled -- Java unavailable.
Jammit Warning: No assets match 'public/stylesheets/public.css'
** Execute thinking_sphinx:start
Failed to start searchd daemon. Check /var/www/projects/log/searchd.log.
Failed to start searchd daemon. Check /var/www/projects/log/searchd.log
** Execute ts:start
they are both using different ports....any idea...also i checked the log file here /var/www/projects/log/searchd.log and its blank ...any idea what to do...i have tried almost everything
rake ts:start starts your sphinx daemon. If you want your apps to share the same search engine, you should only do ts:start once. and both apps should work.