While I’m exciting how much productivity was improved while using Ruby on Rails to code my web application, I found that it is quite hard to deploy the app, much harder than any traditional framework I found!
I almost success with Rails application deployment on shared hosting account at HostGator, but when the thing error, [...]
While I’m exciting how much productivity was improved while using Ruby on Rails to code my web application, I found that it is quite hard to deploy the app, much harder than any traditional framework I found!
I almost success with Rails application deployment on shared hosting account at HostGator, but when the thing error, I can’t find where to see error logs.
No logs = No way to solve the problem easily.
So, I’ve did some research on Ruby on Rails deployment and found some cool deployment related platform, tools which I would like to list here.
- Heroku – RoR deployment platform
- EngineYard – RoR deployment platform
- Capistrano – tool
- RackspaceCloud – cloud server with ROI in mind in long run
From what I’ve learned and tried…
Nothing easier than Heroku, with just a few Git commands, you can have your app running in 5 minutes!
These are commands you need to use with Heroku.
- gem install heroku (install through RubyGems – sudo if needed)
- heroku create your_app_name (create an application on Heroku)
- git push heroku master (deploy to Heroku)
Your app will be ready at your_app_name.heroku.com.
Anyway, as I’m working in two places, my working room at day using Windows and bed room at night using Mac.
I control my source code through GitHub and first created Heroku app at my Mac.
Everything is fine, app can be deployed and running very quickly, I’m very exciting.
However, today I’ve modified my app at my Windows machine and try to deploy… I found…
- I can push everything into GitHub properly.
- I can not push/deploy to Heroku with the error => fatal: ‘heroku’ does not appear to be a git repositiry
My hair losses for a night after I’ve found a solution.
Let’s discuss about Heroku command.
heroku create your_app_name
This command will try to create an app at Heroku server and seeing if you already had ‘heroku’ repository or not, if ‘heroku’ repository doesn’t exists in your local Git. The command will create the ‘heroku’ repository of the active branch for you.
And this is the reason why I can’t deploy through my Windows machine as I didn’t run the heroku create command on this machine. I run it on my Mac.
So, if you are facing the same error as I got, please check if you already had the ‘heroku’ repo or not. By using this command.
git remote -v
I think you didn’t saw the ‘heroku’ repo there. So, to resolve the issue, please add ‘heroku’ repo manually using this command.
git remote add heroku git@heroku.com:your_app_name.git
Then, you will be able to do…
git push heroku master
This will help you solve the problem.
If you still got an error message, but not the same, might be “permissions denied (publickey)”, you might need to add keys to let Heroku know by this command.
heroku keys:add
Hope this help.
This is by far the most popular structure used by any web application.
To have ‘admin’ in sub-folder using to manage the administrative information.
Such as we have ‘category’ model, and we want to manage the scaffold in www.myrailsapp.com/admin/categories instead of www.myrailsapp.com/categories
Too bad, the generators provided by RoR didn’t included this.
Here are the [...]
This is by far the most popular structure used by any web application.
To have ‘admin’ in sub-folder using to manage the administrative information.
Such as we have ‘category’ model, and we want to manage the scaffold in www.myrailsapp.com/admin/categories instead of www.myrailsapp.com/categories
Too bad, the generators provided by RoR didn’t included this.
Here are the steps you need to do this practices.
- Generate a blank controller named ‘admin/categories’. (mentioned that it is ‘categories’, you have to manually ‘s’ it.)
- Generate a scaffold ‘category’, the model ‘category’ will be generated while the ‘categories_controller’ and related views will be generated too.
- Move all functions from ‘categories_controller’ to ‘admin/categories_controller’.
- Delete ‘categories_controller’.
- Move all views from ‘views/categories’ to ‘views/admin/categories’.
- Delete the folder ‘views/categories’.
- Edit the routes.rb and add this line :
namespace :admin do resources :categories end
- Edit the ‘admin/categories_controller’, modify the redirect_to to specify the namespace being used like this :
redirect_to([:admin,@category], ...)
- Edit the ‘admin/categories_controller’, modify the categories_url to admin_categories_url.
- Now edit all views, do the same with link_to, if you found @categoy, just add :admin to specify the namespace.
- Do the same in all views, change xxx_categories_path to xxx_admin_categories_path.
- Then modify the form view, change from form_for(@category) to form_for([:admin,@category]).
It will works now.
Also, if the Destroy action didn’t work, didn’t popup a confirm message, please include the bundled ‘prototype.js’ and ‘rails.js’ into your template too.
Hope this help.
Yup, this is the problem #2 of Ruby on Rails which I want to jot down into my blog.
It is an error message showing after I’ve executed ‘rails new …’ (yo, when attempting to create new rails application)
Problem : Error message is undefined command ‘task’. Reason
This is somewhat a bug in rake [...]
Yup, this is the problem #2 of Ruby on Rails which I want to jot down into my blog.
It is an error message showing after I’ve executed ‘rails new …’ (yo, when attempting to create new rails application)
Problem : Error message is undefined command ‘task’.
Reason
This is somewhat a bug in rake 0.9.0 from what I’ve observe this problem over Google.
Solution
Simple by adding this piece of code…
module ::AppName class Application include Rake::DSL end end module ::RakeFileUtils extend Rake::FileUtilsExt end
between the line…
require 'rake'
and
AppName::Application.load_tasks
Hope this help!
Well, I just want to write a quick short post here about the problem I’m facing when beginning with Ruby on Rails on Windows while I didn’t found this problem when I’m riding Ruby on Rails on Mac OSX.
Problem #1 : error message when the database gems were installed but not required binaries. (sqlite3, [...]
Well, I just want to write a quick short post here about the problem I’m facing when beginning with Ruby on Rails on Windows while I didn’t found this problem when I’m riding Ruby on Rails on Mac OSX.
Problem #1 : error message when the database gems were installed but not required binaries. (sqlite3, mysql or else…)
Reason
This is just because you don’t have the required binaries for those database in the correct place.
Solution
Easy, just download the binaries of those database and put it into c:\Ruby192\bin folder or your ruby’s bin folder.
For sqlite3_ruby gem -> you need sqlite3.dll
For mysql gem -> you need libmysql.dll
Sqlite website allow you to download on compiled binaries, I’m not sure about mysql but I just copy the libmysql.dll from wamp/mysql/bin folder.
Hope this help.
Making Money by Creating iPhone Apps part 2 – Casual Games
Here I’m writing about what’s good about the casual games and how can you make money from it.
After I’ve written the headline, I found that I denied it by myself.
Because if you want to make money, it doesn’t really matter on how you ‘create’ the iPhone app but it is how you ‘marketing’ [...]
Here I’m writing about what’s good about the casual games and how can you make money from it.
After I’ve written the headline, I found that I denied it by myself.
Because if you want to make money, it doesn’t really matter on how you ‘create’ the iPhone app but it is how you ‘marketing’ the app.
Yup, I found many good applications in the AppStore from my patient trying to browse to see the apps that stay in the position lower than 50th in each country.
But with the lack of good marketing effort (maybe the programmer didn’t do any marketing?), their apps were sink in the bottom of the AppStore and no one seen them!
So, to make a lot of money from iPhone app, I suggest this…
- If you don’t have any idea or don’t know what type of application you want to make, just focus to ‘casual games’
Why have to be ‘casual games’?
Because of now, many big names already joined in the iPhone gaming market share and they are all ported their famous games into iPhone, so, the result is,
All hard core gamers will always stick with big names’ hard core games instead of spend some bucks to try the games from indies.
So, the space for you and me almost are only ‘casual games’
The other good things of ‘casual games’ is… It takes so short time to develop compared to those hard core games.
Other thing is I found many iPhone owner love ‘casual games’ than ‘hard core games’ because they play the games on iPhone in a matter of minutes only.
Like playing in Star Buck while waiting for friends, colleagues or family.
So, they can feel more comfortably to pick a ‘casual game’ instead of ‘long time needed game’.
Well, after you have clicked with some idea to make a casual game. It’s a time to…
- Make it
If you are not a programmer, I suggest you to use some outsourcing service like freelancer.com, odesk.com, elance.com or …
Anyway, if it is possible, pick some experienced programmers from your local so you can keep track easily and your casual games will stay in timeline.
If you really can’t see where to outsource, please feel free to reply to this thread and my team might be able to help you.
- Marketing, the crucial part to be determined if your casual games will success or fail!
Nothing to say much about this, because if you are an experienced online marketer, you known how to do it.
But let me summarize various ways to do…
- Blogging about it, yes, get some domain and use WordPress.
- Using Facebook, viral marketing is always great.
- Record a short video while the programmer is working, just to show some awesome game-play of your casual games, then post to youtube, your blog, …
- When it almost finished, find some good iPhone app review websites and submit to them to make a review, this might cost you some bucks but it is efficient if you picked the right review site.
- If you have some budget, make some prize, competition to buzz it!
- Give out as free first, to make it in top ten and get some good reviews then charge later.
- Separate between free version and paid version are good too.
- Advertise in CPA network.
I strongly believe, if you can do just 70% of what I’ve written, you will get more than 500% of ROI in a few months.
But the problem is, when you will begin?
Click here for more details on How to Make Money From iPhone.
I hope you got idea now how to make money from iPhone casual games.
Do You Want to Make Money from iPhone Apps?
Nowadays, you and I have to accept than Apple had changed the mobile world.
Apple now generated a new market which continually growing on mobile application which no one ever did before. Steve Jobs is a genius.
And the best thing is it generates a space for ordinary people to join and get some commissions [...]
Nowadays, you and I have to accept than Apple had changed the mobile world.
Apple now generated a new market which continually growing on mobile application which no one ever did before. Steve Jobs is a genius.
And the best thing is it generates a space for ordinary people to join and get some commissions from it.
Yes, ordinary people like you and me!
By entering the iPhone/iPad apps scene, you have to learn something like how to develop and marketing an iPhone app. This is technically and need some learning timeframe.
However, the most important part is not how to create an app but how to profit from the app.
Yes, I’m talking about marketing and strategic planning.
This post just targeted to open the thread about how to make money from iPhone/iPad apps.
I will share more details on it soon. So, please keep updates.
For people who don’t want to wait my information, please visit http://www.MakeMoneyFromiPhone.com which I’m selling all processes start from building the app, submitting to AppStore and marketing it.
Cheers,
Last evening, I’ve finished a demonstration two iPad applications to my client and the feedback is great.
I’ve did two apps using an awesome Corona SDK in 24 hours due to the reason that my client is in hurry stage, so the timeline is so short.
However, with the awesome boost on productivity provided by [...]
Last evening, I’ve finished a demonstration two iPad applications to my client and the feedback is great.
I’ve did two apps using an awesome Corona SDK in 24 hours due to the reason that my client is in hurry stage, so the timeline is so short.
However, with the awesome boost on productivity provided by Corona SDK. I can made two apps and reached what I expected within 24 hours.
Two apps are…
- Interactive demonstration about lighting environment.
- Offline catalog through Corona Comics.
I will post more details later.
See yah
“The application does not have a valid signature”
Well, after I have tried building an iOS application, I got succeeded on provisioning steps, build succeeded. However, when I try to install the built App into my device, the error message shown. “The application does not have a valid signature” Actually, it is a little bug [...]
“The application does not have a valid signature”
As I have to research on the new project I’m getting from local clients, so, I would like to research on the current available framework which will boost up my productivity significantly.
My targeting is to find out the framework that fit for rich graphics application development which support multi platform including iOS (iPhone, iPad) [...]
As I have to research on the new project I’m getting from local clients, so, I would like to research on the current available framework which will boost up my productivity significantly.
My targeting is to find out the framework that fit for rich graphics application development which support multi platform including iOS (iPhone, iPad) and Android based devices.
After got some research for a few days, I got the following frameworks in my short list.
- MonoTouch : Not actually a framework, but an alternative approach to save ton of my time spending with a myth of Objective-C but I’m not sure if it will works well on Android or not.
- Unity 3D : A great quality framework which proven to works well with both 2D and 3D platform. However, a bit expensive for me. But honestly, I will get one soon for sure.
- Corona : From anscamobile, this is looking great for developing a rich graphics application on 2D platform. Not quite expensive to get started and the trial is great because it allows me to deploy the test app into my devices. I just need to purchase a license when I want to distribute to AppStore only. It’s fair.
Well, to say honestly, I love with Unity 3D because it provides a lot of what I really want. However, with its licensing model and the different of features. It has too many choice to force me to choose and I choose PRO which has an expensive price tag compared to its competitors.
So, this time, I will get Corona from anscamobile, and next time, for a bigger project, I’m surely will try Unity 3D.
I love you all. Keep up your great works!
Before ending, I copied the image to let you see how Corona code compare to Objective-C. (Copied from anscamobile’s Corona web site)
Good luck programming on your devices!
Hi guys,
Today I’m going to share with you if you get stuck trying to learn IoC and implement it into your own ASP.NET MVC application.
I’ll not going to write a deep content about IoC but somehow I will share the short brief of the concept of IoC and how you can easily implement [...]
Hi guys,
Today I’m going to share with you if you get stuck trying to learn IoC and implement it into your own ASP.NET MVC application.
I’ll not going to write a deep content about IoC but somehow I will share the short brief of the concept of IoC and how you can easily implement IoC in your ASP.NET MVC application using MVCContrib.
First of all, let’s share together what is IoC? and what it is for?
IoC stands for “Inversion of Control” which sometime it had been named as DI or “Dependency Injection”.
Actually, both is the same, just a different name.
IoC or DI is the concept that looks like how you code your application to make it support for plug-in architecture.
Such as the old days WinAmp which it can output multiple result from audio files such as…
- Output a sound to speaker (playing music)
- Output a sound to MP3 (encoding)
- Output a sound to WAV (decoding)
and blah blah blah…
There are several plug-ins for WinAmp as a DLL, when you need some new to make WinAmp to output to, you just coding a new DLL and implement what you want there.
This way, when you code the main app, you will never know or never care of what the output will do, it (main app) just output the sound stream to the output plug-in.
This is a good pattern and fit for ASP.NET MVC approach as it’s a real separation-of-concern.
And here is a snippet code of how you can implement this type of application. (plug-in enabled)
- Create an Interface for the output such as …
public interface IPlayerOutput
{
void Play(byte[] soundStream);
void Pause();
void Resume();
void Stop();
}
- In the main app, you should add reference to IPlayerOutput interface and using it like this…
public void btnPlayClicked(object sender)
{
IPlayerOutput *output = new XXX; //Replace XXX with the code to create an instance of the chosen plug-in – usually populate from .DLL files within the output plug-in folder
output.Play(YYY); //Replace YYY with a stream of audio file
}
- This way, the main app will never care of what the output plug-in will do, it just send the audio stream to.
- When you want to code for a send-to-speaker plug-in, you just implement the IPlayerOutput interface and write code to send-to-speak there such as…
public class SpeakerOutput : IPlayerOutput
{
public void Play(byte[] stream)
{
// 1. Decode the audio stream
// 2. Send RAW to speaker
}
}
- If you want to code for WAV output plug-in, just do the same thing but different in the Play function such as…
public class WavOutput : IPlayerOutput
{
public void Play(byte[] stream)
{
// 1. Decode the audio stream as WAV format
// 2. Save WAV data to disk
}
}
- Then, you can let user choose which DLL to be used and load it into the IPlayerOutput interface within the main app. Voila!
So… How it is related to IoC?
Actually, it is the same concept as the plug-in architecture.
The main point is to make each components of application loosely coupled.
To make it simple, IoC is the concept to make your application’s layers independent as much as possible.
You can do IoC by coding like the above set of code in your application. However, it will take you sometime to do yourself.
And that’s why Castle Windsor come into place… They already created this type of things for you!
Anyway, I will not show here how it is being used by generic application. Instead of, I will use Castle Windsor in combination with MVCContrib to do IoC in ASP.NET MVC application.
All I can say is… “It is very easy to do, not that hard like what the concept did”.
To be continued on Part #2…
Archives
- May 2012
- November 2011
- October 2011
- September 2011
- August 2011
- July 2011
- June 2011
- May 2011
- March 2011
- February 2011
- January 2011
- September 2010
- August 2010
- July 2010
- June 2010
- May 2010
- April 2010
- January 2010
- December 2009
- October 2009
- August 2009
- July 2009
- December 2008
- November 2008
- October 2008
- September 2008
- August 2008
- July 2008
- June 2008
- May 2008
- April 2008
- March 2008
- January 2008
- December 2007
- November 2007
- October 2007
- September 2007
- August 2007
- June 2007
Tags
.net 2008 asp.net asp.net mvc asus eee c# corona cpa doctrine dom eee eee pc Internet Marketing ios iPad iphone iPhone development iphone sdk javascript make money netbook online marketing pagerank passion php playstation playstation 3 ps3 ranking ror ruby on rails self help Self Improvement self motivation seo sql success symfony take action the secret ultra compact laptop ultra compact notebook vb.net web development wordpress



