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
Ravendas
Sep 29, 2001




Arachnamus posted:

Does your exe ever actually exit? The web server will hang until the `read` completes.

No, it doesn't exit, it waits for user input. An example simple program would be a series of couts in a console like so:
"Welcome to Rav's City Generator!"
"What is the population of this settlement?"
">"

Then it waits for a cin from the console, an inputted number.

I thought the IO bit was supposed to print out all the couts, then take in the cins for the program.

The programs are all just a series of cin/couts like this. Can ruby do this kind of thing (on windows)?

Edit: Tried it out on programs that don't require input, they just open and spit out a ton of info. Those 'connect' and spit out the proper info. It seems that if it requires any kind of input, it hangs, which makes this whole thing impossible unless I know a better way to do it.

Adbot
ADBOT LOVES YOU

The Journey Fraternity
Nov 25, 2003



I found this on the ground!

Ravendas posted:

No, it doesn't exit, it waits for user input. An example simple program would be a series of couts in a console like so:
"Welcome to Rav's City Generator!"
"What is the population of this settlement?"
">"

Then it waits for a cin from the console, an inputted number.

I thought the IO bit was supposed to print out all the couts, then take in the cins for the program.

The programs are all just a series of cin/couts like this. Can ruby do this kind of thing (on windows)?

Edit: Tried it out on programs that don't require input, they just open and spit out a ton of info. Those 'connect' and spit out the proper info. It seems that if it requires any kind of input, it hangs, which makes this whole thing impossible unless I know a better way to do it.

IO.popen also takes a block with a single argument, which links to stdin/stdout on in the child process. If your program is waiting on input, write whatever is necessary, then read the results.

code:

IO.popen("my.exe") do |p|
  p.write "hello"
  output = p.read
  # do something with output here
end

This is bar coding and I don't have access to a windows machine anyway, but it seems like this is something you'd want.

Jaded Burnout
Jul 10, 2004


Ravendas posted:

No, it doesn't exit, it waits for user input. An example simple program would be a series of couts in a console like so:
"Welcome to Rav's City Generator!"
"What is the population of this settlement?"
">"

Then it waits for a cin from the console, an inputted number.

I thought the IO bit was supposed to print out all the couts, then take in the cins for the program.

The programs are all just a series of cin/couts like this. Can ruby do this kind of thing (on windows)?

Edit: Tried it out on programs that don't require input, they just open and spit out a ton of info. Those 'connect' and spit out the proper info. It seems that if it requires any kind of input, it hangs, which makes this whole thing impossible unless I know a better way to do it.

The question is less whether Ruby can do it, more whether HTTP can do it. The answer is "not really".

The distinction is that you're moving from a stateful interactive environment (a console) to a stateless transactional environment (HTTP). Rack/Sinatra/Rails (and most web servers) are designed around the principle of taking user input via HTTP parameters, running some code to generate an output, then sending that output back to the user.

The user (or browser) should be sending their input to your exe in the HTTP params, which you can then feed into the exe to get your output, which you then return to the user.

"The Journey Fraternity"'s code suggestion would help with this, but remember this is sequential code that needs to execute and close before the user will see anything, at which point the request is done and you start over again. You don't get any back-and-forth with a vanilla HTTP request.

If you want to simulate an interactive terminal on the web, I'd recommend looking into websockets and using a non-HTTP backend as an endpoint for it. There's probably libraries out there for doing console-like stuff on the web.

Jaded Burnout fucked around with this message at 11:30 on May 26, 2014

Ravendas
Sep 29, 2001




Thanks for the help. It looks like I've got some more reading and googling to do.

EVGA Longoria
Dec 25, 2005

Let's go exploring!

OP is a bit out of date, so apologies if this should be common knowledge now.

Are there any good resources for people who know Ruby and want to move from Sinatra to Rails? I don't actually have Sinatra experience, but I've used the crap out of Perl's Dancer, which is a clone of Sinatra. I've also got Ruby, just want to dip into the Rails side of things for a new job.

I've got Rails In Action 3 & 4 from Manning, which is probably where I'll go if there's nothing better. I've also got a Code Academy subscription that I keep forgetting to cancel, so I could do the Rails for Zombie courses if they're worthwhile.

I'm not looking for handholding through the entire process of developing a web app. I want to get up to speed on how to best use Rails. Something like Eloquent Ruby or Well Grounded Rubyist, but for Rails.

Cocoa Crispies
Jul 20, 2001

Vehicular Manslaughter!

Pillbug

EVGA Longoria posted:

I'm not looking for handholding through the entire process of developing a web app. I want to get up to speed on how to best use Rails. Something like Eloquent Ruby or Well Grounded Rubyist, but for Rails.

You can already program for the web, you might just need a goal and something to hit for reference. Make a Twitter clone, first anonymous, then add users, following, profile pages, and image uploads, in that order.

MrDoDo
Jun 27, 2004

You better remember quick before we haul your sweet ass down to the precinct.

EVGA Longoria posted:

I'm not looking for handholding through the entire process of developing a web app. I want to get up to speed on how to best use Rails. Something like Eloquent Ruby or Well Grounded Rubyist, but for Rails.

The Rails 4 Way sounds to be more like what you want. There is also a version for 3 if thats what you are using.

Doh004
Apr 22, 2007

Mmmmm Donuts...

MrDoDo posted:

The Rails 4 Way sounds to be more like what you want. There is also a version for 3 if thats what you are using.

I'm a web (C# and mvc.net) and mobile developer but I'd like to get into Rails. Would I be better off with a more beginner oriented book? I'm confident in my ability to learn a new language and framework, especially one as well documented as this.

kayakyakr
Feb 16, 2004

Kayak is true

Doh004 posted:

I'm a web (C# and mvc.net) and mobile developer but I'd like to get into Rails. Would I be better off with a more beginner oriented book? I'm confident in my ability to learn a new language and framework, especially one as well documented as this.

Nah, hop in and go for it using the guides/api docs if you are confident.

EVGA Longoria
Dec 25, 2005

Let's go exploring!

Cocoa Crispies posted:

You can already program for the web, you might just need a goal and something to hit for reference. Make a Twitter clone, first anonymous, then add users, following, profile pages, and image uploads, in that order.

Good idea, and I might end up doing this in the long run. This is roughly what Rails for Zombies does, for reference.

MrDoDo posted:

The Rails 4 Way sounds to be more like what you want. There is also a version for 3 if thats what you are using.

Took a look and it does look to be what I was looking for, thanks. Picked it up and will read it soon.

Fillerbunny
Jul 25, 2002

so confused.

MrDoDo posted:

The Rails 4 Way sounds to be more like what you want. There is also a version for 3 if thats what you are using.

I would also like to thank you for this recommendation. It's exactly the kind of book I was looking for.

mmachine
Jan 5, 2006
So say I have a form (using the SimpleForm gem):

pre:
<%= simple_form_for @person do |f| %>

     <%= f.input :first_name %>
     <%= f.input :last_name %>

<% end %>

Now, don't ask why, but say if those fields have a value, is there a way to have them render to the view differently? Example, render them not as an input element, buy maybe their value as a string in a <p>. Or maybe as an input, but locked. Then, if those values are blank, a user would see an input field they can enter.

kayakyakr
Feb 16, 2004

Kayak is true

mmachine posted:

So say I have a form (using the SimpleForm gem):

pre:
<%= simple_form_for @person do |f| %>

     <%= f.input :first_name %>
     <%= f.input :last_name %>

<% end %>

Now, don't ask why, but say if those fields have a value, is there a way to have them render to the view differently? Example, render them not as an input element, buy maybe their value as a string in a <p>. Or maybe as an input, but locked. Then, if those values are blank, a user would see an input field they can enter.

might not be the cleanest looking or most ideal, but the first answer that comes to mind is:

Ruby code:
<% unless @persion.first_name.blank? %>
 <p><%= @person.first_name %></p>
<% else %>
  <%= f.input :first_name %>
<% end %>

mmachine
Jan 5, 2006

kayakyakr posted:

might not be the cleanest looking or most ideal, but the first answer that comes to mind is:

Ruby code:
<% unless @persion.first_name.blank? %>
 <p><%= @person.first_name %></p>
<% else %>
  <%= f.input :first_name %>
<% end %>

That is definitely the right idea. The issue I was having is that I was dealing with unlimited nested resources, so I needed to sniff those individually -- just using @person wasn't enough. I did pretty much exactly what you outlined, just like this:

Ruby code:

<% if f.object.first_name.blank? %>
     <%= f.input :first_name %>
<% else %>
     <p><%= f.object.first_name %></p>
<% end %>

This was a first for me, sniffing the f.object, so I wasn't really considering I'd need to go about nested resources differently. I'm used to sniffing only objects like @person you described.

Chilled Milk
Jun 22, 2003

No one here is alone,
satellites in every home
Say I have two models

Stage
- has_many milestones


Milestone
- belongs_to stage
- has a due_date


Given that various Stages may overlap (ie the range of its milestones' due_date), what's the best way to retrieve the Stages in order of its earliest milestone? I could do it with ruby but trying to build the right SQL query for it eludes me on this little sleep

Pardot
Jul 25, 2001




code:
with first_milestones as
  (select stage_id, min(due_date) as first_date from milestones group by stage_id)

select stages.*, first_date from stages join first_milestones on stage_id = stages.id
http://sqlfiddle.com/#!15/c2007/5

Chilled Milk
Jun 22, 2003

No one here is alone,
satellites in every home

Pardot posted:

code:
with first_milestones as
  (select stage_id, min(due_date) as first_date from milestones group by stage_id)

select stages.*, first_date from stages join first_milestones on stage_id = stages.id
http://sqlfiddle.com/#!15/c2007/5

That looks close but it's coming back ordered by id, change the schema to
insert into stages (id, name) values (2, 'a'), (1, 'b'), (3, 'c');

and you get
code:
ID 	NAME 	FIRST_DATE
2 	a 	January, 10 2012 00:00:00+0000
1 	b 	January, 01 2012 00:00:00+0000
3 	c 	January, 19 2014 00:00:00+0000

Pardot
Jul 25, 2001




add order by first_date asc to the end

Chilled Milk
Jun 22, 2003

No one here is alone,
satellites in every home

Pardot posted:

add order by first_date asc to the end

I was going to say I tried that but looking at it again I was writing first_milestones. Ugh. Thanks, man.

prom candy
Dec 16, 2005

Only I may dance

mmachine posted:

That is definitely the right idea. The issue I was having is that I was dealing with unlimited nested resources, so I needed to sniff those individually -- just using @person wasn't enough. I did pretty much exactly what you outlined, just like this:

Ruby code:

<% if f.object.first_name.blank? %>
     <%= f.input :first_name %>
<% else %>
     <p><%= f.object.first_name %></p>
<% end %>

This was a first for me, sniffing the f.object, so I wasn't really considering I'd need to go about nested resources differently. I'm used to sniffing only objects like @person you described.

If you need to do a lot of this it might be worth subclassing whatever form builder SimpleForm uses and adding a method on it so you can do something like <%= f.input_or_p_tag :first_name %>

It would keep your views cleaner and make it easy to make changes across the board down the road if you needed to.

DankTamagachi
Jan 20, 2005
Tamagachi to your throat!
So I am working on Facebook login for my new rails project. I have a working setup, but don't know if I missed any security issues. How'd I do?

Routes:
code:
match 'fb_login' => 'facebook#fb_login', :as=> :fb_login, :via => [:get, :post]
Facebook Controller:
code:
class FacebookController < ApplicationController

  def fb_login
    if !params.has_key? "code" # First step of log in
      @user = User.new
      session[:fb_state] = SecureRandom.hex
      logger.debug("Set session state to #{session[:fb_state]}")
      redirect_to @user.fb_authorize_url('http://www.mysite.net/fb_login', session[:fb_state])
    elsif params["state"] == session[:fb_state] # second step of log in - state is passed back and correct, we have a code
      logger.debug("Params-state equals session state")
      @user=User.new
      @ac = @user.fb_return_remote_access_token(params[:code], 'http://www.mysite.net/fb_login')
      begin
        logger.debug("@ac: #{@ac}")
        me = JSON.parse(RestClient.get "https://graph.facebook.com/me?access_token=#{@ac}")
        @user = User.find_by_email(me["email"])
        if @user.nil?
          @user = User.new
          @user.link_fb_user(@ac)
        end
        @user.active = true
        @user.save!
        @usersesh = UserSession.create(@user)
        @usersesh.save!
      rescue Exception=>e
        # REDIRECT, ERROR
        logger.debug("ERROR LOGGING IN VIA FACEBOOK")
        logger.debug(e.inspect)
        flash[:error]="Could not log into facebook"
        redirect_to :recent
      end

      flash[:notice]="Facebook Log In Complete!"
      redirect_to :recent

  else #Error
      logger.debug("session-state = #{session[:fb_state]} and params_state = #{params["state"]}")
      flash[:error]="Could not log into facebook, and you shouldn't be here"
      redirect_to :recent
    end

  end
User Model:
code:
  def fb_authorize_url(callback_url='http://www.mysite.net/fb_link',session_based = nil)

    if session_based
      logger.debug("session based auth URL")
      return "https://www.facebook.com/dialog/oauth?client_id=#{FACEBOOK_ID}&redirect_uri=#{callback_url}&state=#{session_based}&scope=email,publish_stream"
    else
      logger.debug("non session based auth URL")
      self.fb_state = SecureRandom.hex
      self.fb_user = true
      self.save!
      return "https://www.facebook.com/dialog/oauth?client_id=#{FACEBOOK_ID}&redirect_uri=#{callback_url}&state=#{self.fb_state}&scope=email,publish_stream"
    end

  end

  def fb_return_remote_access_token(fb_code, callback_url = 'http://www.mysite.net/fb_link')

    begin
      url = "https://graph.facebook.com/oauth/access_token?client_id=#{FACEBOOK_ID}&redirect_uri=#{callback_url.html_safe}&client_secret=#{FACEBOOK_SECRET}&code=#{fb_code}"
      logger.debug(url)
      response = RestClient.get url
      pair = response.body.split("&")[0].split("=")
      fb_expires = response.body.split("&")[1].split("=")
      if (pair[0] == "access_token" )
        pair[1]
      else
        self.errors.add(:oauth_verifier, "Invalid token, unable to connect to facebook: #{pair[1]}")
      end

    rescue Exception=>e
      logger.debug("Exception Caught")
      logger.debug(e.inspect)
    end

  end

Pollyanna
Mar 5, 2005

Milk's on them.


I'm doing the Rails tutorial right now...how do you keep track of all the different gems and frameworks and everything you need to use? I mean, yeah, Gemfiles, but how do you remember what needs to be in the Gemfile? What's the usual procedure if I want to start a new app right from scratch? Is there a canonical list of gems required or something?

EAT THE EGGS RICOLA
May 29, 2008

Pollyanna posted:

I'm doing the Rails tutorial right now...how do you keep track of all the different gems and frameworks and everything you need to use? I mean, yeah, Gemfiles, but how do you remember what needs to be in the Gemfile? What's the usual procedure if I want to start a new app right from scratch? Is there a canonical list of gems required or something?

You get a gemfile that describes what you need when you generate an application?

KoRMaK
Jul 31, 2012



Pollyanna posted:

I'm doing the Rails tutorial right now...how do you keep track of all the different gems and frameworks and everything you need to use? I mean, yeah, Gemfiles, but how do you remember what needs to be in the Gemfile? What's the usual procedure if I want to start a new app right from scratch? Is there a canonical list of gems required or something?
I think rails is the only one you need to start. You build up a list of stuff you like and are comfortable with as you go on. Like a bag of tools.

Jaded Burnout
Jul 10, 2004


Pollyanna posted:

I'm doing the Rails tutorial right now...how do you keep track of all the different gems and frameworks and everything you need to use? I mean, yeah, Gemfiles, but how do you remember what needs to be in the Gemfile? What's the usual procedure if I want to start a new app right from scratch? Is there a canonical list of gems required or something?

How do you remember the ingredients to a recipe? Start with one that's written down by someone else (like the one Rails generates for you with a new application), and over time as you make changes based on your needs and preferences you'll find you know it from scratch.

Pollyanna
Mar 5, 2005

Milk's on them.


Right, I think I get it...but then the Rails tutorial goes through setting up authentication and factories and stuff from scratch. Am I basically gonna be replicating the Rails tutorial every time I want to set up something with authentication and a database?

good jovi
Dec 11, 2000

'm pro-dickgirl, and I VOTE!

Pollyanna posted:

Right, I think I get it...but then the Rails tutorial goes through setting up authentication and factories and stuff from scratch. Am I basically gonna be replicating the Rails tutorial every time I want to set up something with authentication and a database?

Only in the sense that yes, you're going to have to actually write your application. Eventually you figure out what gems best handle common tasks (like authentication) for you, and maybe even write a few of your own to encapsulate anything you find yourself writing over and over again.

Pollyanna
Mar 5, 2005

Milk's on them.


Well yeah, I understand that I'll have to write something myself. But I'm a programmer, so I'm lazy, and I wanna focus on the unique parts of my application rather than "okay, here's how we validate an email, here's how we make a private method to hash a remember token...". Finding gems that help seems to be the solution.

kayakyakr
Feb 16, 2004

Kayak is true

Pollyanna posted:

Well yeah, I understand that I'll have to write something myself. But I'm a programmer, so I'm lazy, and I wanna focus on the unique parts of my application rather than "okay, here's how we validate an email, here's how we make a private method to hash a remember token...". Finding gems that help seems to be the solution.

Don't mean to be, "hey google it", but google is a good source to look up those gems. Also https://www.ruby-toolbox.com/ is a great place to search as well.

KoRMaK
Jul 31, 2012



Pollyanna posted:

Well yeah, I understand that I'll have to write something myself. But I'm a programmer, so I'm lazy, and I wanna focus on the unique parts of my application rather than "okay, here's how we validate an email, here's how we make a private method to hash a remember token...". Finding gems that help seems to be the solution.
Asking us isn't going to help you find what you want to find. You have to go find it.

Pollyanna
Mar 5, 2005

Milk's on them.


I don't mean to ask you to tell me what to do, but I was wondering to what extent I needed to be familiar with the underpinnings of Rails, like it goes through in the tutorial. :( Not that I don't appreciate the familiarity and I'm certainly learning, but I wanna focus on the parts of the application that are least likely to already have an implementation.

Molten Llama
Sep 20, 2006
You don't strictly need to be familiar with the underpinnings of Rails, but it'll be a hell of a lot easier to swap out convention for something that works better (or even customize one of those existing implementations) if you are. Debugging's also easier if you have half a clue what's supposed to be happening.

99% of the Rails questions on Stack Overflow wouldn't be asked if the poster had taken the time to understand how anything they were using worked. The people who rag on Rails for having "too much magic" tend to be the people who never learned (a) how it works or (b) Ruby. It's very easy to mindlessly crap out half a site and suddenly realize you're now way beyond your depth. Rails has either a gentle learning curve or an arduous learning 90-degree-angle depending on how you approach it.

Or to quote the Devise authentication framework (one of the first places people end up very out of their depth):

quote:

If you are building your first Rails application, we recommend you to not use Devise. Devise requires a good understanding of the Rails Framework. In such cases, we advise you to start a simple authentication system from scratch, today we have two resources:
Once you have solidified your understanding of Rails and authentication mechanisms, we assure you Devise will be very pleasant to work with. :)

Molten Llama fucked around with this message at 16:06 on Jun 13, 2014

KoRMaK
Jul 31, 2012



My one major tip: learn where your gem libs are and dig around in them. Sometimes the documentation is on the github site, but if you get into the code you'll see all sorts of helpful comments. I had to do this with attr_encrypted when we realized that it wasn't using IV and Salt. Someone forked it, made the improvement, and then it was merged back into attr_encrypted but no documentation talked about it. I eventually got into the library and started doing searches for keywords and found what I needed.

The other thing I did was made my own helper function, I extended serialize to has_many_serialized and now I can use that in my models. I was helped out by looking at how serialize is defined (seen here https://github.com/rails/rails/blob...erialization.rb )



Changing topics, I just had to wrestle with rails to get it to update one column. Doing the following resulted in no changes being sent to the db
Ruby code:
#my_things_controller.rb
def my_function
  my_thing.title[2] = params[:third_character] #replace the third character with the one sent from params
  my_thing.save
end
I tried a couple variations of that and it didn't work. I had to finally rest on using update_column
Ruby code:
def my_function
  _title = my_thing.title
  _title[2] = params[:third_character] #replace the third character with the one sent from params
  my_thing.update_column(:title, _title)
end
That's fucky as poo poo. Nearest I can tell is that the change of one character didn't make the object realize that it had changes on that column, so it didn't do an update query including that column. I watched the sql statements in the console, and the title never got touched until update_column was used.

The Journey Fraternity
Nov 25, 2003



I found this on the ground!

KoRMaK posted:

My one major tip: learn where your gem libs are and dig around in them. Sometimes the documentation is on the github site, but if you get into the code you'll see all sorts of helpful comments. I had to do this with attr_encrypted when we realized that it wasn't using IV and Salt. Someone forked it, made the improvement, and then it was merged back into attr_encrypted but no documentation talked about it. I eventually got into the library and started doing searches for keywords and found what I needed.

The other thing I did was made my own helper function, I extended serialize to has_many_serialized and now I can use that in my models. I was helped out by looking at how serialize is defined (seen here https://github.com/rails/rails/blob...erialization.rb )



Changing topics, I just had to wrestle with rails to get it to update one column. Doing the following resulted in no changes being sent to the db
Ruby code:
#my_things_controller.rb
def my_function
  my_thing.title[2] = params[:third_character] #replace the third character with the one sent from params
  my_thing.save
end
I tried a couple variations of that and it didn't work. I had to finally rest on using update_column
Ruby code:
def my_function
  _title = my_thing.title
  _title[2] = params[:third_character] #replace the third character with the one sent from params
  my_thing.update_column(:title, _title)
end
That's fucky as poo poo. Nearest I can tell is that the change of one character didn't make the object realize that it had changes on that column, so it didn't do an update query including that column. I watched the sql statements in the console, and the title never got touched until update_column was used.

You'd want to call "title_will_change!" at the top of my_function unless the character was the same.

Ruby code:
#my_things_controller.rb
def my_function
  my_thing.title_will_change! unless title[2] == params[:third_character]
  my_thing.title[2] = params[:third_character] #replace the third character with the one sent from params
  my_thing.save
end

KoRMaK
Jul 31, 2012



The Journey Fraternity posted:

You'd want to call "title_will_change!" at the top of my_function unless the character was the same.

Ruby code:
#my_things_controller.rb
def my_function
  my_thing.title_will_change! unless title[2] == params[:third_character]
  my_thing.title[2] = params[:third_character] #replace the third character with the one sent from params
  my_thing.save
end
Oh, okay. Thanks! Also, why? Is _title and @my_thing.title the same object in memory? I thought doing _title = @my_thing.title would create a new instance of the string. And when I set @my_thing.title = _title it would see that there was a different string set.

The Journey Fraternity
Nov 25, 2003



I found this on the ground!

KoRMaK posted:

Oh, okay. Thanks! Also, why? Is _title and @my_thing.title the same object in memory? I thought doing _title = @my_thing.title would create a new instance of the string. And when I set @my_thing.title = _title it would see that there was a different string set.

When you're doing assignment in Ruby, it's by reference- two names pointing to the same thing.

Ruby code:
x = 'hello'
y = x
x == y  # true
x[1] = '3'
x == y  # true
This is the reason there are two versions of some methods, like Enumerable#sort and Enumerable#sort!- sort returns a sorted copy without modifying the original, and sort! modifies that instance in-place.

If you straight-up need copies and you know you do, look at Object#dup and Object#clone.

KoRMaK
Jul 31, 2012



The Journey Fraternity posted:

When you're doing assignment in Ruby, it's by reference- two names pointing to the same thing.
That explains it and is really important to know. So I could have done the following
Ruby code:
_title = "#{my_thing.title}"
x == y #true
_title[1] = "k"
x == y #false
and not have to specify that title_will_change.

Jaded Burnout
Jul 10, 2004


KoRMaK posted:

That explains it and is really important to know. So I could have done the following
Ruby code:
_title = "#{my_thing.title}"
x == y #true
_title[1] = "k"
x == y #false
and not have to specify that title_will_change.

Yes, though `my_thing.title.dup` is a better option.

Pollyanna
Mar 5, 2005

Milk's on them.


Are there any recommended plugins for Rails dev in Sublime? I saw a couple regarding snippets and partials, but both of them were kinda mediocre. Plus, I'd like to have something that automatically detects if I make an .html.erb file and treats it as such.

Adbot
ADBOT LOVES YOU

A MIRACLE
Sep 17, 2007

All right. It's Saturday night; I have no date, a two-liter bottle of Shasta and my all-Rush mix-tape... Let's rock.

You might want to look into Rubymine for an IDE. I'm technically faster in VIM but being able to run your specs inline is really handy for workflow.

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