Issue in uploading gem to Geminabox - ruby

I stood up a Rack server with Geminabox, running on my machine at http://localhost:9292. Now I was trying to upload the gem to the server (from a different tab on the terminal acting like a client), but when I type:
gem sources -a http://localhost:9292
I get the following error:
Error fetching http://localhost:9292:
bad response Not Found 404 (http://localhost:9292/specs.4.8.gz)
There is a trailing colon and I'm a bit lost, any help on that?
Thanks!

You need to upload at least one gem before Geminabox starts to serve the necessary files.
(I know this is an old question but I came here from google so others might as well)

Related

Errors when starting Rails Server

im quite new to ruby and rails. I have just installed Ruby, DevKit, Rails and a few gems.
I just created my first rails project and everything seemed good until i tried to start the server(rails server) The error message is below. I cannot grab the whole error because there is alot of errors and the command lines starts to remove it.
Update 1, Full Log
Error Log
Cause: "The libmysql.lib included in the MySQL Connector/C 64 bit is not compatible with the mingw64-gcc compiler."
This page details how to fix the problem.

How to Use Another Gem Source With Bundler

So I know that I can specify another remote source in my Gemfile, like
source 'https://rubygems.org'
source 'http://my-gem-location'
For my use case I want this to be S3 (I can create an http address to the gem there).
What I am confused about is what format the gem should be at this endpoint. Right now its just a series of directories and .rb files which doesn't work. I get an error like:
Fetching source index from http://my-remote-repo
Retrying source fetch due to error (2/3): Bundler::HTTPError Could not fetch specs from http://my-remote-repo
Retrying source fetch due to error (3/3): Bundler::HTTPError Could not fetch specs from http://my-remote-repo
Could not fetch specs from http://my-remote-repo
I figured if its zipped or something that might help but my testing leads to nothing but this error. I also could not find much helpful documentation on hosting remote gems. Does anyone know how I can get this to work?
The gem should be in .gem format to do that you need to do:
gem build <yougemname>.gemspec
You can find comprehensive information on creating a gem here:
http://guides.rubygems.org/make-your-own-gem/
Hope it helps!

heroku assets not found 404

We are dealing with an issue where our assets are compiling w/o any issues during slug compilation. However, starting yesterday after a push to both our staging and production applications, we are now running into issues where the browser is indicating that the assets can't load for some reason.
Using the browser dev tools we are seeing this error:
Failed to load resource: the server responded with a status of 404 (Not Found) :
/assets/application-a3b17e738ce8996d058795310e3cd9b4.js
The first thing we decided to do was rollback our codebase to the last commit (which was the commit that was fully functional in a previous heroku push). The same issue exists where the browser can't load the asset.
Using bash, I connected to the heroku instance and checked out the public/assets directory to ensure the assets were actually there. They are ALL there with the correct hash codes preceding the file names. The files are not empty and the manifest file looks good to go.
I'm not sure what else to try at this point. We've never had issues until now with loading of assets. There is nothing in the heroku push logs that indicate anything is throwing an error at any point.
I had the same issue. It seems to be fixed for me after including the rails_12factor gem in my production gems (in my Gemfile). I found this out after reading the first part of this Heroku Support page: https://devcenter.heroku.com/articles/rails4
Logging and assets
Heroku treats logs as streams and requires your logs to be sent to STDOUT. To enable STDOUT logging in Rails 4 you can add the rails_12factor gem. This gem will also configure your app to serve assets in production. To add this gem add this to your Gemfile:
gem 'rails_12factor', group: :production
This gem allows you to bring your application closer to being a 12factor application. You can get more information about how the gem configures logging and assets read the rails_12factor README. If this gem is not present in your application, you will receive a warning while deploying, and your assets and logs will not be functional.
The 'rails_12factor' gem has gem dependencies on the rails_serve_static_assets gem and rails_stdout_logging. Basically, if you don't want your Rails app using its precious cycles on processing requests just to serve assets then you'll need to figure out a different solution such as a CDN: https://devcenter.heroku.com/articles/using-amazon-cloudfront-cdn-with-rails

No such file to load bundler error for Rails 3

I have a Rails 3 app ready for staging.
I haven't got a VPS host set up yet. As I was planning to have everything on shared host for the first few months.
Problem:
cd myapp
bundle check
result:
The Gemfile's dependencies are satisfied
Passenger error:
Error message:
no such file to load -- bundler
Exception class:
LoadError
Frustrating thing about shared hosts is that I have to add these lines on config.ru:
ENV['GEM_HOME'] = '/home/username/.gems'
ENV['GEM_PATH'] = '$GEM_HOME:/usr/lib/ruby/gems/1.8'
Still no luck. Same no such file to load bundler error appears.
Has anybody got this working? Rails 3, Debian, shared host (dreamhost)?
I could just go ahead and register on Slicehost/Fivebean but before I do, I'd like to know why that error is showing up.
Thanks.
The solution is here http://rvm.beginrescueend.com/integration/passenger/. You need to point your HTTP server to passenger_ruby wrapper instead of bin/ruby.
E.g. for RVM & Apache it should be something like that:
PassengerRuby /Users/username/.rvm/bin/passenger_ruby
Passenger doesn't read environment variables from config.ru until after it has loaded. Without your backtrace I can't be positive, but I suspect everything will work if you just run bundle lock. If you're still having trouble after that, there's a list of troubleshooting information at the bottom of the bundler README that I need to know exactly what's going on.
Rails hosting on shared hosts is already a minefield, but throwing in Rails 3 in all its pre-release goodness including Bundler reinventing the rubygems workflow is a recipe for pulling your hair out.
I host a few Rails sites on Dreamhost, but only the versions they officially support, otherwise it's just not worth the time. You can get a VPS now for almost as cheap as Dreamhost, and you will save hours and hours of your own time.
If you're looking for an easy answer, I'd suggest voting up the following and crossing your fingers:
Rails 3 on dreamhost?
For me, this turned out to be an issue with the passenger_ruby directive that passenger-install-nginx-module spits out at the end of installation. It was missing the gemset name in the path to the ruby.
This works: (the fix)
passenger_ruby /Users/dzello/.rvm/wrappers/ruby-1.9.2-p0#rails3/ruby;
This did not: (what passenger-install-nginx-module spits out)
passenger_ruby /Users/dzello/.rvm/rubies/ruby-1.9.2-p0/bin/ruby
Note the passenger_ruby line does not include the proper gem path - the #rails3 (rails3 is the gemset name) portion is missing, even though it got it right for passenger root.
Found some random blog. It had some lines that went in 'config.ru', that seemed to work for me.
ENV['GEM_HOME'] = '/home/farleyknight/.gems'
ENV['GEM_PATH'] = '$GEM_HOME:/usr/lib/ruby/gems/1.8'
require 'rubygems'
Gem.clear_paths
Maybe it will work for you..
I had this problem with vps plus rvm, rails3, capistrano and nginx.
Passenger was installed by root but the web site was installed by user fox. Nginx (root) was configured to run the app as fox. When logged in as fox, Bundler was installed but running gem list bundler as root showed no gem.
Passenger start would give error bundler was missing. Only cure for this was to install bundler as root AND fox. I'm guessing passenger checks for bundler while not under the user fox as configured in nginx.

How can I get past "http://gems.rubyforge.org/ does not appear to be a repository" error message

Question 828421 asked similar question, but received only one real answer (update rubygems) and that attempt results in the same error.
Ruby version 1.9.1.p243 on Windows. Included Gem, version 1.3.5.
Never installed any gems before; never did any special config for this Ruby.
Ruby itself works, as does irb, and "gem" operates but can't do install (and maybe other ops).
Tried this (from a book):
gem install rspec
Got this:
ERROR: http://gems.rubyforge.org/ does
not appear to be a repository
ERROR: While executing gem ...
(Gem::RemoteFetcher::FetchError)
SocketError: getaddrinfo: The storage control blocks were destroyed.
(http://gems.rubyforge.org/yaml)
When I go to that URL (without "yaml") using MSIE7, I get a page titled "Gemcutter | awesome gem hosting" and have no problem wandering around that site. So I don't -think- it's a proxy problem (though this is all from inside corporate firewall/proxies/etc).
When I go to that URL -with- "yaml", it goes to "http://production.s3.rubygems.org/yaml" and shows what I assume is an update specification page, starting with this:
--- !ruby/object:Gem::SourceIndex
I didn't destroy any "storage control blocks". So what is preventing gem from installing a gem?
Web search shows MANY people having this same problem over a long span of time, but I have yet to see anyone say "It's because of THIS, so do THIS to fix it." Well, someone suggested updating "gem", but trying that gets same error.
Help please?
Your browser might be using system-wide proxy settings or some sort of automatic configuration. The gem command probably doesn't. I'm behind an university proxy and I can't install/update any gems normally, but can access everything with my browser. To install gems, I normally create a tunnel to my server so I can bypass the proxy server.
This might help you to configure the proxy settings for the gem command: How do I update Ruby Gems from behind a Proxy (ISA-NTLM)
Sample:
sudo gem install nifty-generators -p http://proxy:port
It works well.
If your proxy requires authentication, then use:
gem install --http-proxy http://USERNAME:PASS#HOST:PORT gem_name
This can "at times" mean that for some reason rubygems.org is down currently, and so your local "invisible proxy" is returning you a 404 or what not.
#Tomas Markauskas didn't work for me because i'm not behind a proxy. And I didn't find a solution anywhere, I tried disable my AV and firewall, didn't
This was the solution for me:
gem install rails -r -w -p
Hope this will help people with the same problem.
EDIT: I have Windows 7 64bit.

Resources