Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
Cock Democracy
Jan 1, 2003

Now that is the finest piece of chilean sea bass I have ever smelled
If you want an unmanaged server, rackspace cloud is a good cheap option.

Adbot
ADBOT LOVES YOU

Cock Democracy
Jan 1, 2003

Now that is the finest piece of chilean sea bass I have ever smelled
I'm not familiar with Heroku but is your app in a subdirectory? If so you might want to try adding config.serve_static_assets = true to your config/application.rb

Cock Democracy
Jan 1, 2003

Now that is the finest piece of chilean sea bass I have ever smelled

Obsurveyor posted:

Virtual PC is oddly unstable for the virtualized OS when running Ubuntu. It really annoys me because it feels like something Microsoft would do on purpose. I had to start using VMWare because of this.

This reminds me of back in the Windows 3.1 days, I installed WordPerfect and it would give me these kinds of errors constantly. I thought for years that it was an MS conspiracy to get you to buy Word.

Cock Democracy
Jan 1, 2003

Now that is the finest piece of chilean sea bass I have ever smelled

plasticbugs posted:

The first Rails site that I've ever put into production is now live at 3dstxt.com. However, my question may not be Rails specific.

Is there an easy Rails Way to prevent Google from indexing certain pages? I'd rather Google didn't crawl my app's "show" pages, where users are posting semi-personal content (email addresses, 3DS Friend Codes, etc).

EDIT for clarity: Because of how the URLs are created, this includes any URL that matches 3dstxt.com/XXXXX

I still would like Google to index the root at 3dstxt.com/ and possibly blog pages or help pages that may eventually exist.

Is robots.txt the only option?
If you don't want google to index these pages, consider whether you really want unauthenticated users to see these pages at all.

Cock Democracy
Jan 1, 2003

Now that is the finest piece of chilean sea bass I have ever smelled

NotShadowStar posted:

Where oh god I want to leave the midwest frozen wasteland where people can't stop using PHP
Sorry, but no region is safe from this, even here on the inhabited east coast.

Cock Democracy
Jan 1, 2003

Now that is the finest piece of chilean sea bass I have ever smelled
You could download and install the latest rubygems from http://rubygems.org/

Cock Democracy
Jan 1, 2003

Now that is the finest piece of chilean sea bass I have ever smelled

asveepay posted:

Ubuntu 10.04, rvm, build rubygems from source (stupid easy via instructions on their site), apache & passenger standalone
This is my current setup as well. And redcar for editing.

Anyone remember back in the day, there was a windows app with ruby + rails + mysql + apache all ready to start with one click? That was awesome.

Cock Democracy
Jan 1, 2003

Now that is the finest piece of chilean sea bass I have ever smelled

asveepay posted:

is Redcar good now? I used it until they started building the new version, and then the development lagged so much I uninstalled it and switched to VIM, then gedit. One of my coworkers has been using redcar as well but he seems kinda 'meh' about it.
It still has some flaws. It takes forever to start up for one. I'm not a big fan of how you have to do "redcar install" after every upgrade. It's still my editor of choice though. It's just so easy to jump around to different files with CTRL+T. That, the syntax highlighting and auto-indent are its strong points IMO.

edit: spelling

Cock Democracy fucked around with this message at 16:35 on May 27, 2011

Cock Democracy
Jan 1, 2003

Now that is the finest piece of chilean sea bass I have ever smelled
Am I the only one using apache/passenger to host rails apps on their own? After seeing the S3 failure, I'm surprised to still see so much support for EC2/heroku here.

Cock Democracy
Jan 1, 2003

Now that is the finest piece of chilean sea bass I have ever smelled
I'm not sure what you're trying to do, but lightbox is a JS tool for fancy image viewing. Why are you using it to show a form? I don't get it.

render :layout => 'something' is to change the layout you are using for that action, which may not be what you want to do. Read up on it here.

And the :as => :contacts in your routes is unnecessary. It would be named that anyway.

Cock Democracy
Jan 1, 2003

Now that is the finest piece of chilean sea bass I have ever smelled
Paperclip question: I have a model where I want the user to upload a file, then a resque worker does some things to the file and saves a finished version of the file. I want to keep both the original and finished files, so I think I need two paperclip fields. The question is, how to do I tell paperclip to create the finished file when I have the contents in a variable? I can only find info on how to create the file from a form submission.

edit: Maybe it's OK to set the finished file's file_name then write to that file directly?

Cock Democracy fucked around with this message at 16:44 on Jul 14, 2011

Cock Democracy
Jan 1, 2003

Now that is the finest piece of chilean sea bass I have ever smelled

NotShadowStar posted:

JUST USE HEROKU, gently caress
I really dislike this attitute. Let's face it: Heroku went down for days earlier this year. I realize it wasn't really their fault and they are taking action to prevent it from happening again. I also realize they have some cool features and it's a preference of a lot of people, but it's certainly not the only pain free option. Rails developers shouldn't put all their eggs in one basket when it comes to hosting, right?

That being said, rails is certainly a pain in the rear end on some hosts. I had hytek hosting and had major problems with it, so I got a rackspace cloud server and rolled out my own apache + passenger server. It's a bit more work, sure, but I like having total control and the ability to fix anything myself.

I hear speedyrails is good too. I think a good rule of thumb is to only use rails-centric hosts.

Cock Democracy
Jan 1, 2003

Now that is the finest piece of chilean sea bass I have ever smelled
Did you accidentally change the migration after applying it? I've done that more times than I'd like to admit.

Cock Democracy
Jan 1, 2003

Now that is the finest piece of chilean sea bass I have ever smelled
drat. I guess that is pretty messed up.

Cock Democracy
Jan 1, 2003

Now that is the finest piece of chilean sea bass I have ever smelled

Trabisnikof posted:

Because if you know how to use it, it can be very powerful. Obviously no longer the easiest system to learn, but why re-invent the wheel for those of us who already know how to do complex things with it.
I recently forced myself to learn vim and use it regularly. I was using redcar previously but it's such a memory hog. I wanted a minimalist approach. vim is pretty slick for rails development (at least with this enabled). I'll give sublime a shot too if it's all the rage.

Cock Democracy
Jan 1, 2003

Now that is the finest piece of chilean sea bass I have ever smelled
Anyone else going to RubyNation next weekend?

Cock Democracy
Jan 1, 2003

Now that is the finest piece of chilean sea bass I have ever smelled
Any ideas on this extremely frustrating problem?

Cock Democracy
Jan 1, 2003

Now that is the finest piece of chilean sea bass I have ever smelled

Abrahamsen posted:

Is running a VM with Ubuntu similar enough to the real deal?
Yep.

Cock Democracy
Jan 1, 2003

Now that is the finest piece of chilean sea bass I have ever smelled
I get this error when running resque-web. I've tried rebooting, reinstalling resque and vegas and recompiling ruby. This started happening after I ran out of hard drive space while a resque job was writing to a file. I made some free space but resque-web hasn't started since. I've tried on ruby 1.9.2 and 1.9.3 and the same error happens:

quote:

dan@ubuntu:~$ resque-web
[2012-09-10 22:34:02 -0400] Starting 'resque-web'...
/home/dan/.rvm/rubies/ruby-1.9.3-p125/lib/ruby/1.9.1/open-uri.rb:35:in `initialize': No such file or directory - (Errno::ENOENT)
from /home/dan/.rvm/rubies/ruby-1.9.3-p125/lib/ruby/1.9.1/open-uri.rb:35:in `open'
from /home/dan/.rvm/rubies/ruby-1.9.3-p125/lib/ruby/1.9.1/open-uri.rb:35:in `open'
from /home/dan/.rvm/gems/ruby-1.9.3-p125/gems/vegas-0.1.11/lib/vegas/runner.rb:146:in `port_open?'
from /home/dan/.rvm/gems/ruby-1.9.3-p125/gems/vegas-0.1.11/lib/vegas/runner.rb:160:in `check_for_running'
from /home/dan/.rvm/gems/ruby-1.9.3-p125/gems/vegas-0.1.11/lib/vegas/runner.rb:108:in `start'
from /home/dan/.rvm/gems/ruby-1.9.3-p125/gems/vegas-0.1.11/lib/vegas/runner.rb:77:in `initialize'
from /home/dan/.rvm/gems/ruby-1.9.3-p125/gems/resque-1.22.0/bin/resque-web:13:in `new'
from /home/dan/.rvm/gems/ruby-1.9.3-p125/gems/resque-1.22.0/bin/resque-web:13:in `<top (required)>'
from /home/dan/.rvm/gems/ruby-1.9.3-p125/bin/resque-web:19:in `load'
from /home/dan/.rvm/gems/ruby-1.9.3-p125/bin/resque-web:19:in `<main>'
from /home/dan/.rvm/gems/ruby-1.9.3-p125/bin/ruby_noexec_wrapper:13:in `eval'
from /home/dan/.rvm/gems/ruby-1.9.3-p125/bin/ruby_noexec_wrapper:13:in `<main>'
Any ideas?

Cock Democracy
Jan 1, 2003

Now that is the finest piece of chilean sea bass I have ever smelled

prom candy posted:

Is there such a file or directory?
I can't figure out what file or directory it's looking for. It seems to be checking to see if a port is open, which makes sense since resque-web needs to listen on a port.

Cock Democracy fucked around with this message at 15:55 on Sep 11, 2012

Cock Democracy
Jan 1, 2003

Now that is the finest piece of chilean sea bass I have ever smelled

prom candy posted:

What's going on in /home/dan/.rvm/rubies/ruby-1.9.3-p125/lib/ruby/1.9.1/open-uri.rb at line 35?

Here it is. Line 35 is commented:

code:
  def open(name, *rest, &block) # :doc:
    if name.respond_to?(:open)
      name.open(*rest, &block)
    elsif name.respond_to?(:to_str) &&
          %r{\A[A-Za-z][A-Za-z0-9+\-\.]*://} =~ name &&
          (uri = URI.parse(name)).respond_to?(:open)
      uri.open(*rest, &block)
    else
      open_uri_original_open(name, *rest, &block)  # line 35
    end
  end

Cock Democracy
Jan 1, 2003

Now that is the finest piece of chilean sea bass I have ever smelled

Smol posted:

Delete the resque_web.url file. It's likely empty right now, as it couldn't write to it when the disk is full.

E: It's likely in ~/.vegas/resque_web.url
That worked. Thanks a ton! I had been trying to figure that out since last week. I was about to break down and configure a new VM for it.

Cock Democracy
Jan 1, 2003

Now that is the finest piece of chilean sea bass I have ever smelled
Thanks Smol. I'll keep that in mind and will dig a little deeper next time.

Cock Democracy
Jan 1, 2003

Now that is the finest piece of chilean sea bass I have ever smelled

Physical posted:

This is for a production database. Seed file will drop the current one will it not?
No, it will just run the seeds.rb code against the existing database.

Cock Democracy
Jan 1, 2003

Now that is the finest piece of chilean sea bass I have ever smelled

raej posted:

If I were building a webapp to keep track of artists and albums, and wanted to make a page for users to be able to keep track of what albums that have (and things like condition of album, and if it's vinyl, cd, etc) would Ruby be a place to start?

Basically a database of artists, a database of albums that correspond to artists, and a collection page listing a user's actual albums held.
You're going to want to use Ruby on Rails, not just Ruby itself. Most people recommend learning Ruby first before diving into Rails, but I didn't go this route and learned them both at the same time. If you have any familiarity with other kinds of programming and web development going into it, I think that helps a lot. Good luck!

Cock Democracy
Jan 1, 2003

Now that is the finest piece of chilean sea bass I have ever smelled

prom candy posted:

We have a ton of apps on 2.3.5 so updating isn't an option for us (because of the stupid forced HTML escaping they introduced). Luckily we were able to manually patch our 2.3.5 install but still.
Can't you work around that by using the raw method?

Cock Democracy
Jan 1, 2003

Now that is the finest piece of chilean sea bass I have ever smelled

Smol posted:

For what it's worth, their COO said that a blog post is incoming.

http://news.ycombinator.com/item?id=5217818

They responded.

quote:

Yesterday, one of our customers let us know about significant performance issues they have experienced on Heroku. They raised an important issue and I want to let our community know about it. In short, Ruby on Rails apps running on Bamboo have experienced a degradation in performance over the past 3 years as we have scaled.

We failed to explain how our product works. We failed to help our customers scale. We failed our community at large. I want to personally apologize, and commit to resolving this issue.

Our goal is to make Heroku the best platform for all developers. In this case, we did not succeed. But we will make it right. Here’s what we are working on now:

Posting an in-depth technical review tomorrow
Quickly providing more visibility into your app’s queue of web requests
Improving our documentation and website to accurately reflect our product
Giving you tools to understand and improve the performance of your apps
Working closely with our customers to develop long-term solutions

I am committing to listening to you, acting quickly to meet your needs and making sure Heroku is a platform that you trust for all of your applications. If you have additional concerns, please let me know. My email address is oren.teich@heroku.com.

Oren Teich GM, Heroku
I was expecting an overly technical, confusing, defensive explanation that wouldn't be accepted by the Rails community. This is the complete opposite and a nice surprise. Mark Twain once said, "Always acknowledge a fault. This will throw those in authority off their guard and give you an opportunity to commit more." I totally agree and it's cool to see that Heroku does too.

Cock Democracy
Jan 1, 2003

Now that is the finest piece of chilean sea bass I have ever smelled

noskill posted:

So it seems like they apologized for not communicating how things work, but there's no mention whether or not their "new" routing is going to be changed. Which probably means that it won't.

Don't get me wrong, I think that their damage control at this point is actually a good thing; I'm just not sure if I want to continue using their new routing mesh.
I'd say he mentioned it. He said they "commit to resolving this issue" and that they'll be posting an in-depth review, which I'd be interested in reading.

Cock Democracy
Jan 1, 2003

Now that is the finest piece of chilean sea bass I have ever smelled

EAT THE EGGS RICOLA posted:

What's the best way to set up a date field with an optional month and day? (i.e. if something was made at some unknown point in time in 1850, it would return just the year)
I've never used it but there's this gem. From the looks of it, they don't tackle the whole "how do I store this in the database" issue.

Cock Democracy
Jan 1, 2003

Now that is the finest piece of chilean sea bass I have ever smelled
The site is down for me but I'd be interested in checking it out. (And yeah I removed the accidental period from the end of the link.)

Cock Democracy
Jan 1, 2003

Now that is the finest piece of chilean sea bass I have ever smelled

Peristalsis posted:

Datafile model stuff
What's your intention with

quote:

Datafile.includes(datafile_permissions: [:user])
? I would expect that you're trying to filter Datafiles for a specific user, so there would be a where method in your query, something like:

quote:

Datafile.includes(:datafile_permissions).where('datafile_permissions.user_id = ?', current_user.id).references(:datafile_permissions)
but perhaps it sounds like you want all datafiles and their permissions? If that's the case, I agree that it's not such a crazy amount of data that it should take very long. I'd be interested in seeing the model code for Datafile and DatafilePermission. Maybe they are set up wrong somehow.

Adbot
ADBOT LOVES YOU

Cock Democracy
Jan 1, 2003

Now that is the finest piece of chilean sea bass I have ever smelled

Tea Bone posted:

I'm starting to think perhaps generating the output PDF from another PDF is the wrong way of going about this. I'd perhaps be better off generating everything as an image then converting it to PDF? The output pdf doesn't need to be editable (or even selectable). But the templates are usually multiple pages long with only one or two of those pages requiring anything overlayed.
Yeah, that seems reasonable to me. I could even see having a UI where you upload the new PDF, it gets converted to an image, and you can choose the x,y values by clicking where the text should go. Then you could be really lazy and have someone else keep it updated!

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply