9 Replies - 3473 Views - Last Post: 23 June 2012 - 01:37 PM Rate Topic: -----

#1 mccabec123  Icon User is offline

  • D.I.C Head

Reputation: 18
  • View blog
  • Posts: 225
  • Joined: 03-March 11

Ruby On Rails

Posted 23 June 2012 - 08:15 AM

Hey guys, I've taken the time to sit and try and figure out how to use Ruby, and I have a fair enough understanding of how it works, but now that I've introduced Rails into it I feel way over my head, this was the primary reason I wanted to use Ruby was to create web apps. I recently seen a project which I had some interest in, and wanted to mess around with it, but I seem to be having no luck whatsoever in getting it to work, or even where to start to the point where I'm just guessing.

Basically I've seen an admin panel on the open source challenge that I wanted to see how it worked and I thought it'd be a good place to start as it covers most of CRUD and a few other things, I've downloaded the project and it's in the format of a ruby gem, but I have no idea how to use it, do I have to create a new rails system and place the files inside there, or do I make a new system and include the Gems somehow? I'm totally bogged down with this, I never thought it'd be this difficult?

If somebody could guide me step by step on how to use a gem or whatever I need to get me going, here's the link to the admin panel that I wanted to try out:

https://github.com/g...ll/active_admin

The guide on there has been no use, I still have no clue what to do :/ I really need a hand, any help is greatly appreciated as I'm looking to broaden my horizons and try out some other languages other than PHP for web development.

Thanks again guys

Is This A Good Question/Topic? 0
  • +

Replies To: Ruby On Rails

#2 blackcompe  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 1131
  • View blog
  • Posts: 2,484
  • Joined: 05-May 05

Re: Ruby On Rails

Posted 23 June 2012 - 08:44 AM

Did read through the Getting Started documentation? Since it's accessible as a gem, you can create a new rails app, $rails new <project name>, add activeadmin to the gemfile, run the bundler and afterward run the installer. You can also (I think) fork the repo and clone it locally, but you'll probably need to to the run the bundler to ensure you've got all the gems downloaded. It's probably smart to go with the first method.

The Rails Guide is a good resource.

I too looked at the open source challenge. Looks cool! I don't think I'll have enough time to give a good effort. I wish I did.

This post has been edited by blackcompe: 23 June 2012 - 09:03 AM

Was This Post Helpful? 2
  • +
  • -

#3 mccabec123  Icon User is offline

  • D.I.C Head

Reputation: 18
  • View blog
  • Posts: 225
  • Joined: 03-March 11

Re: Ruby On Rails

Posted 23 June 2012 - 09:16 AM

View Postblackcompe, on 23 June 2012 - 08:44 AM, said:

Did read through the Getting Started documentation? Since it's accessible as a gem, you can create a new rails app, $rails new <project name>, add activeadmin to the gemfile, run the bundler and afterward run the installer. You can also (I think) fork the repo and clone it locally, but you'll probably need to to the run the bundler to ensure you've got all the gems downloaded. It's probably smart to go with the first method.

The Rails Guide is a good resource.

I too looked at the open source challenge. Looks cool! I don't think I'll have enough time to give a good effort. I wish I did.


Yeh, I tried all of that, but when it says add it to the Gemfile where am I adding it to? I've only picked up Rails within the past week or so, just want something to muck about with and examine. I just don't understand all the different commands and where to point to where to get the gems to work etc. Just don't know where to start to get this working :/

Also I have cloned it, does this mean that it should be able to be used as a standalone without any other application? I know that this is simply a backend framework to be incorporated into an already existing system, but I thought surely they'd have some sort of backend built in :/

This post has been edited by mccabec123: 23 June 2012 - 09:18 AM

Was This Post Helpful? 0
  • +
  • -

#4 blackcompe  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 1131
  • View blog
  • Posts: 2,484
  • Joined: 05-May 05

Re: Ruby On Rails

Posted 23 June 2012 - 09:56 AM

Try these steps:

cd ~/<Documents>
rails new myrailsapp


Enter the password to install the gems. Now add the activeadmin to the gemfile.

cd myrailsapp
nano Gemfile


Add

gem 'activeadmin'


in the outermost scope, i.e. not in a 'group' :<env> block. Run the bundler again:

bundle install


Now run the installer:

rails generate active_admin:install


Then run the migrations and fire up the server:

rake db:migrate
rails server


I literally just went through these instructions and set up the system flawlessly, so I'm sure you can get it without too much problem.

Posted Image

This post has been edited by blackcompe: 23 June 2012 - 10:00 AM

Was This Post Helpful? 3
  • +
  • -

#5 mccabec123  Icon User is offline

  • D.I.C Head

Reputation: 18
  • View blog
  • Posts: 225
  • Joined: 03-March 11

Re: Ruby On Rails

Posted 23 June 2012 - 10:09 AM

This is greatly appreciated as you probably didn't want to have to do this for me :P

Did you clone the repo as well?

[OR]

Should I create a new Rails system and then add to that Gemfile?
Was This Post Helpful? 0
  • +
  • -

#6 blackcompe  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 1131
  • View blog
  • Posts: 2,484
  • Joined: 05-May 05

Re: Ruby On Rails

Posted 23 June 2012 - 10:13 AM

Quote

Did you clone the repo as well?


I created a new rails app, added to the gemfile, ran the bundler, and installed active admin -- No cloning involved whatsoever.
Was This Post Helpful? 1
  • +
  • -

#7 mccabec123  Icon User is offline

  • D.I.C Head

Reputation: 18
  • View blog
  • Posts: 225
  • Joined: 03-March 11

Re: Ruby On Rails

Posted 23 June 2012 - 10:35 AM

I done everything like you said, and when I run the 'rails generate active_admin:install' I get this error:

Posted Image

/Users/Conner/activeAdmin/config/application.rb:13:in `<module:ActiveAdmin>': superclass mismatch for class Application (TypeError)
	from /Users/Conner/activeAdmin/config/application.rb:12:in `<top (required)>'
	from /Users/Conner/.rvm/gems/ruby-1.9.3-p125/gems/railties-3.2.6/lib/rails/commands.rb:24:in `require'
	from /Users/Conner/.rvm/gems/ruby-1.9.3-p125/gems/railties-3.2.6/lib/rails/commands.rb:24:in `<top (required)>'
	from script/rails:6:in `require'
	from script/rails:6:in `<main>'


Was This Post Helpful? 0
  • +
  • -

#8 blackcompe  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 1131
  • View blog
  • Posts: 2,484
  • Joined: 05-May 05

Re: Ruby On Rails

Posted 23 June 2012 - 12:40 PM

Google is your friend! View the first search result. About half way down the page there's a poster, jv, with your same problem -- use find 'superclass' to find his post. Review the proposed solutions: (1) Don't name the newly created rails app 'active_admin' and (2) try updating your system gems with gem update –system. If those don't help, you're on your own. I'm using Rails 3.1.0 and Ruby 1.9.2 BTW.

This post has been edited by blackcompe: 23 June 2012 - 12:43 PM

Was This Post Helpful? 1
  • +
  • -

#9 mccabec123  Icon User is offline

  • D.I.C Head

Reputation: 18
  • View blog
  • Posts: 225
  • Joined: 03-March 11

Re: Ruby On Rails

Posted 23 June 2012 - 12:43 PM

Hey, I finally got it working! I used homebrew to install it all before, and I think it caused some problems, so it's all good now. Really weird, it all just worked perfectly once I reverted it :P Some guys got a rogue guide out there :/
Was This Post Helpful? 0
  • +
  • -

#10 blackcompe  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 1131
  • View blog
  • Posts: 2,484
  • Joined: 05-May 05

Re: Ruby On Rails

Posted 23 June 2012 - 01:37 PM

Sweeeeet!
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1