error in proxy in rubymine - ruby-on-rails

0
votar en contra
favorito
I've tried to run a gem in rubymine and I have the following error:
ERROR: Could not find a valid gem 'rails' (>= 0), here is why: Unable
to download data from https://rubygems.org/ - no such name
(https://rubygems.org/specs.4.8.gz)
Then I configured the proxy like this:
set http_proxy=http://user:pass#serv:port
and I had the following error:
ERROR: While executing gem ... (Net::HTTPServerException) 407 "Proxy
Authentication Required ( Forefront TMG requires authorization to
fulfill the request. Access to the Web Proxy filter is denied. )"
Could you know what can it be?
thank you!

It should be "https://rubygems.org/" instead of "https rubygems.org/" (missing ://). Make sure that you have a proper value for source in Gemfile.

Related

Angular - Error: [$injector:unpr] Unknown provider: IdleProvider

Getting the error Error: [$injector:unpr] Unknown provider: IdleProvider in my application when it is deployed to our staging server using dokku but I am not getting it when running it on my local machine. I'm using ng-idle 1.2.1
I've found this question asked a number of times but the cause was always related to the changes made in version 1.0.0 where the service names were changed. The only thing I can think of is that the minification of the code is the problem but as far as I can see the code should be ok but I am not an expert. Any help would be greatly appreciated.
It's written in Coffeescript
configuration = (RestangularProvider, $logProvider, growlProvider, IdleProvider, KeepaliveProvider) ->
.
.
.
return
configuration.$inject = [
'RestangularProvider'
'$logProvider'
'growlProvider'
'IdleProvider'
'KeepaliveProvider'
]
angular
.module 'vssApp.config', [
'restangular'
]
.config configuration
EDIT
While trying to replicate the problem on my local machine I removed the 'ngIdle' module in the modules array below. This resulted in the same behavior so I am assuming that the problem stems from the ngIdle module not being loaded correctly here. I still feel that minification could be causing the problem but, again, I'm not sure why or how to fix it.
modules = [
'ui.router'
'ui.bootstrap'
'ui.select'
'ngAnimate'
'ngMessages'
'ngSanitize'
'ngCookies'
'smart-table'
'angularMoment'
'templates'
'angular-storage'
'angular-growl'
'vssApp.core.auth'
'vssApp.core.loading'
'ngIdle'
'cgPrompt'
'vssApp.filters'
]
runBlock.$inject = [
'$templateCache'
]
angular
.module 'vssApp.core', modules
.run runBlock
EDIT 2
Here's the full output from the error message I'm getting
Error: [$injector:modulerr] Failed to instantiate module vssApp due to:
Error: [$injector:modulerr] Failed to instantiate module vssApp.config due to:
Error: [$injector:unpr] Unknown provider: IdleProvider
http://errors.angularjs.org/1.3.16/$injector/unpr?p0=IdleProvider
at https://SERVER/assets/application-85a5fd382c73380bf2a71b66e581c941.js:3:18814
at https://SERVER/assets/application-85a5fd382c73380bf2a71b66e581c941.js:4:16489
at getService (https://SERVER/assets/application-85a5fd382c73380bf2a71b66e581c941.js:4:14903)
at Object.invoke (https://SERVER/assets/application-85a5fd382c73380bf2a71b66e581c941.js:4:15466)
at runInvokeQueue (https://SERVER/assets/application-85a5fd382c73380bf2a71b66e581c941.js:4:13793)
at https://SERVER/assets/application-85a5fd382c73380bf2a71b66e581c941.js:4:14062
at forEach (https://SERVER/assets/application-85a5fd382c73380bf2a71b66e581c941.js:3:19482)
at loadModules (https://SERVER/assets/application-85a5fd382c73380bf2a71b66e581c941.js:4:13587)
at https://SERVER/assets/application-85a5fd382c73380bf2a71b66e581c941.js:4:13964
at forEach (https://SERVER/assets/application-85a5fd382c73380bf2a71b66e581c941.js:3:19482)
http://errors.angularjs.org/1.3.16/$injector/modulerr?p0=vssApp.config&p1=E…net%2Fassets%2Fapplication-85a5fd382c73380bf2a71b66e581c941.js%3A3%3A19482)
at https://SERVER/assets/application-85a5fd382c73380bf2a71b66e581c941.js:3:18814
at https://SERVER/assets/application-85a5fd382c73380bf2a71b66e581c941.js:4:14406
at forEach (https://SERVER/assets/application-85a5fd382c73380bf2a71b66e581c941.js:3:19482)
at loadModules (https://SERVER/assets/application-85a5fd382c73380bf2a71b66e581c941.js:4:13587)
at https://SERVER/assets/application-85a5fd382c73380bf2a71b66e581c941.js:4:13964
at forEach (https://SERVER/assets/application-85a5fd382c73380bf2a71b66e581c941.js:3:19482)
at loadModules (https://SERVER/assets/application-85a5fd382c73380bf2a71b66e581c941.js:4:13587)
at createInjector (https://SERVER/assets/application-85a5fd382c73380bf2a71b66e581c941.js:4:16844)
at doBootstrap (https://SERVER/assets/application-85a5fd382c73380bf2a71b66e581c941.js:3:28466)
at bootstrap (https://SERVER/assets/application-85a5fd382c73380bf2a71b66e581c941.js:3:28995)
http://errors.angularjs.org/1.3.16/$injector/modulerr?p0=vssApp&p1=Error%3A…net%2Fassets%2Fapplication-85a5fd382c73380bf2a71b66e581c941.js%3A3%3A28995)
A rule of thumb is to load modules dependencies in each place where they are used. This allows to decouple them. And this eliminates race condition with service provider injection.
If the app looks like this
angular.module('vssApp', ['vssApp.config', 'ngIdle', ...])..
angular.module('vssApp.config', ['restangular'])...
service provider for Idle service is not defined at the time when vssApp.config module is loaded.
While this
angular.module('vssApp', ['ngIdle', 'vssApp.config', ...])
angular.module('vssApp.config', ['restangular'])...
avoids race condition but still indicates code smell.
It should be
angular.module('vssApp.config', ['restangular', 'ngIdle'])...
This issue applies to service providers only and config phase. Service instances can be injected for any module order.
Finally found the cause and solution to this, it seems to have been a bower issue.
It's a Rails app, so I specified ng-idle 1.2.1 in the bower.json file but for some reason the bower file was ignored when the app was being deployed using Dokku and the last installed version 0.3.5 remained, which meant that the pre-1.0.0 ng-idle services naming convention was still being used where all service names were preceded with a $. This resulted in the Unknown provider: IdleProvider error because $IdleProvider was the actual service name.
In the end I had to connect to the docker container and remove and reinstall all bower components. Running bower update as part of the deployment was not enough for some reason. When I have more time I will investigate what caused this behavior and I will report here.

RSolr::Error::Http: RSolr::Error::Http - 400 Bad Request error?

I'm trying to index rich documents but I'm facing some issues. I'm following this link:
http://cbpowell.wordpress.com/2012/09/18/indexing-rich-documents-with-rails-sunspot-solr-sunspot-cell-and-carrierwave-cookbook-style/
$rake sunspot:reindex
rake aborted!
RSolr::Error::Http: RSolr::Error::Http - 400 Bad Request
Error: {'responseHeader'=>{'status'=>400,'QTime'=>29},'error'=>{'msg'=>'undefined field type','code'=>400}}
Request Data: "<?xml version=\"1.0\" encoding=\"UTF-8\"?><delete><query>type:Article</query></delete>"
Note: Solr we are configured manually (not inside application)
http://archive.apache.org/dist/lucene/solr/4.7.0/
If you are using solr 4.7.0 please pay attention to tika-core-x.x.jar and tika-parser-x.x.jar files. sunspot_cell_jars gem includes outdated version for both of them (check this page www.java2s.com/Code/Jar/t/tika.htm to find correct version for yours configuration)
Also you can try use updated sunspot_cell gem

mixpanel gem breaks cucumber tests

i'm using cucumber+capybara to test my app. But after adding mixpanel to my code i've got errors
Mixpanel::ConnectionError at /users =================================== > Could not write to Mixpanel, server responded with 200 returning: '{"status": 0, "error": "distinct_id, missing or empty"}'
how can i fix it?

Passenger gem getting updated for Rails app

I have a staging server from my client which has passenger(3.0.5 and 3.0.2) installed on it for an rails app(v=2.3.13), but when I start the server using passenger on the console it's getting updated to 3.0.5-x86_64-ruby1.8.7-linux-gcc4.4.3-1002. In my Gemfile I have mentioned
gem 'passenger', '=3.0.5'
Why is it getting updated?
Thanks in advance.
Here's the log....
when I run the command, **`**RAILS_ENV=staging passenger start**.`**
__________________________________________________________
Nginx core 0.8.54 isn't installed
Phusion Passenger Standalone will automatically install it into:
/var/lib/passenger-standalone/3.0.5-x86_64-ruby1.8.7-linux-gcc4.4.3-1002/nginx-0.8.54
This will only be done once. Please sit back and relax while installation is
in progress.
Checking for required software...
GNU C++ compiler... found at `/usr/bin/g++`
GNU make... found at `/usr/bin/make`
A download tool like 'wget' or 'curl'... found at /usr/bin/wget
Ruby development headers... found
OpenSSL support for Ruby... found
RubyGems... found
Rake... found at `/usr/local/bin/rake`
rack... found
Curl development headers with SSL support... found
OpenSSL development headers... found
Zlib development headers... found
file-tail... found
daemon_controller >= 0.2.5... found
Downloading Passenger binaries for your platform, if available...
Resolving standalone-binaries.modrails.com... 97.107.130.55
Connecting to standalone-binaries.modrails.com|97.107.130.55|:80... connected.
HTTP request sent, awaiting response... 404 Not Found
2013-10-09 08:52:00 ERROR 404: Not Found.
Looks like it's not. But don't worry, the necessary binaries will be compiled from source instead.
Downloading Nginx binaries for your platform, if available...
#
Resolving standalone-binaries.modrails.com... 97.107.130.55
Connecting to standalone-binaries.modrails.com|97.107.130.55|:80... connected.
HTTP request sent, awaiting response... 404 Not Found
2013-10-09 08:52:00 ERROR 404: Not Found.
Looks like it's not. But don't worry, the necessary binaries will be compiled from source instead.
Downloading Nginx...
# wget -O /tmp/root-passenger-standalone-21842/nginx-0.8.54.tar.gz http://nginx.org/download/nginx-0.8.54.tar.gz
--2013-10-09 08:52:00-- http://nginx.org/download/nginx-0.8.54.tar.gz
Resolving nginx.org... 206.251.255.63
Connecting to nginx.org|206.251.255.63|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 650001 (635K) [application/octet-stream]
Saving to: '/tmp/root-passenger-standalone-21842/nginx-0.8.54.tar.gz'
100%
[======================================================================================================>] 650,001 788K/s in 0.8s
2013-10-09 08:52:01 (788 KB/s) - `/tmp/root-passenger-standalone-21842/nginx-0.8.54.tar.gz' saved [650001/650001]
Installing Phusion Passenger Standalone...

Aptana "Content Assist" did not complete normally

I have a problem with the Aptana Studio 3.
It is a fresh installation. I have imported a Ruby on Rails - project that a edited with a texteditor before. I want to use Aptana, for a more comfortable development but the Content Assist fails.
If I try to use the Content Assist it throws the following exception and write it to the Console:
[2013-03-08 16:34:40] An error occurred while processing the invoke block for the command ERb Content Assist in C:\Users\Chris\Aptana Rubles\rails.ruble\commands\content_assist.rb: (NoMethodError) undefined method `getInstance' for Java::ComAptanaIndexCore::IndexManager:Class
org.jruby.exceptions.RaiseException: (NoMethodError) undefined method `getInstance' for Java::ComAptanaIndexCore::IndexManager:Class
at Rails::ContentAssistant.index_manager(C:/Users/Chris/Aptana Rubles/rails.ruble/lib/content_assistant.rb:87)
at Rails::ContentAssistant.gem_indices(C:/Users/Chris/Aptana Rubles/rails.ruble/lib/content_assistant.rb:79)
at org.jruby.RubyProc.call(org/jruby/RubyProc.java:274)
at org.jruby.RubyProc.call(org/jruby/RubyProc.java:229)
at Java::JavaUtil::Collection.each(C:/Users/Chris/AppData/Local/Aptana Studio 3/plugins/org.jruby_1.6.4.1331328108/lib/ruby/site_ruby/shared/builtin/java/java.util.rb:7)
at org.jruby.RubyEnumerable.collect(org/jruby/RubyEnumerable.java:706)
at Rails::ContentAssistant.gem_indices(C:/Users/Chris/Aptana Rubles/rails.ruble/lib/content_assistant.rb:79)
at Rails::ContentAssistant.gem_and_project_indices(C:/Users/Chris/Aptana Rubles/rails.ruble/lib/content_assistant.rb:74)
at Rails::ContentAssistant.assist(C:/Users/Chris/Aptana Rubles/rails.ruble/lib/content_assistant.rb:31)
at #<Class:0x101f95cf6>.define_content_assist(C:\Users\Chris\Aptana Rubles\rails.ruble\commands\content_assist.rb:7)
at org.jruby.RubyProc.call(org/jruby/RubyProc.java:274)
at org.jruby.RubyProc.call(org/jruby/RubyProc.java:233)
The Aptana Log File contains this message:
!ENTRY org.eclipse.ui 4 4 2013-03-08 16:34:40.465
!MESSAGE "Content Assist" did not complete normally. Please see the log for more information.
!ENTRY org.eclipse.ui 4 0 2013-03-08 16:34:40.465
!MESSAGE (Errno::EINVAL) =::
!STACK 0
org.jruby.exceptions.RaiseException: (Errno::EINVAL) =::
at org.jruby.RubyHash.replace(org/jruby/RubyHash.java:1623)
I don't know how to handle this error. Do I have to install anything else to use the Content Assist with Ruby on Rails?
I found a solution at https://jira.appcelerator.org/browse/APSTUD-2718
As a workaround:
1) Commands > Rails Bundle > Edit this Bundle will grab a copy of the
new code
This removed the error messages for me.
I have found this link, that describes my problem as "Unresolved" (reported in 12/Sep/12):
https://jira.appcelerator.org/browse/APSTUD-7406
But this is "Aptana Studio 3.2.2" and I have got Version 3.3.3, I can't believe that this problem isn't solved.
Anybody else using Aptana knowing this problem?

Resources