padrino / padrino-docs Goto Github PK
View Code? Open in Web Editor NEWContents of our official site, feel free to fork and apply your changes.
Home Page: http://www.padrinorb.com
Contents of our official site, feel free to fork and apply your changes.
Home Page: http://www.padrinorb.com
This is a documentation bug.
Visiting the Padrino caching documentation I am told to specify the cache as follows:
Padrino.cache = Padrino::Cache::Store::Memory.new(50)
Following those instructions yields the following error:
NameError: uninitialized constant Padrino::Cache::Store
The above applies to the creation of all different types of store.
The documentation should tell me to create a cache following the new approach:
Padrino.cache = Padrino::Cache.new(:LRUHash)
The documentation in the padrino-cache module worked for me.
I've not tested it for other versions, as this is a new development for us.
Just look at http://padrinorb.com/guides/standalone-usage-in-sinatra/ at the bottom and vote, if we should keep that. I like the idea but what order should we take for the linking of the articles?
Bests Matthias
The docs recommends one use Padrino.before_load
but when this runs app/locale
has not been loaded, so assigning a locale that's not part of Padrino will result in a failure even though the locale is configured in app/locale
.
The right way to go about the seems to be via the app's just adding the local locales to configure
hookI18n.load_path
yourself in before_load
or configure
.
Details see padrino/padrino-framework#2048 @cburgmer is this fine for you to discuss things here?
Finally, run the fresh
rake command to install the latest version:
padrino-framework$ sudo rake fresh
Does this really work?
It says, that the padrino-cache gem is not implemented so far? Is this true? I dunno right now.
http://www.tokyo-project.com/ => found details under https://twitter.com/CaDs/status/836530544854773760
Found under https://github.com/DAddYE/web-frameworks-benchmark/wiki. I like the idea and why shouldn't we show how fast Padrino is?
I noticed that /guides/examples
only lists an old test-app, which no longer exists.
From @dariocravero on March 18, 2013 19:49
.components
.now
and next
. Also, add some comments to the code from the original repo (https://github.com/Cirex/padrino-flash).Padrino.dependency_paths
.Let's build this list up! :)
Copied from original issue: padrino/padrino-framework#1137
There have be a lot of commits some containing corrections to the live docs.
Implemented new way to call render in mailers. It allows to omit mailer name or mailer name and message name.
Example:
mailer :sample do
message :message2
render 'congrats' #=> renders from 'sample/congrats'
end
message :message1
render #=> renders from 'sample/message1'
end
end
The how-to-get-in-contact-with-us-part
If you have any questions be sure to contact us at:
[@padrinorb](http://twitter.com/#!/padrinorb), discuss things on
[google groups](https://groups.google.com/forum/?hl=en#!forum/padrino), join us
on IRC at “\#padrino” on freenode or
[open an issue](https://github.com/padrino/padrino-framework/issues) on GitHub.
Try to learn how to do it.
Content can be found under http://padrinorb.wikimatze.de/guides/adding-new-components/#rendering-engine
Configuring the logger to suit your needs is totally possible with Padrino.
The easiest way is to set the options in config/boot.rb
, anytime before Padrino.load!
.
Padrino::Logger::Config[:development] = { :log_level => :devel, :format_datetime => " [%Y-%m-%d %H:%M:%S] ", :stream => :to_file }
If you want to redefine your logger at a later stage in your app you will need to run Padrino::Logger.setup!
right after your new logger settings.
TODO: Explain the options.
The current examples on http://padrinorb.com/guides/introduction/examples/ are all dead. New files can be found under https://github.com/padrino/padrino-framework/wiki/Projects-using-Padrino.
Beside, ask https://maptia.com/ if they are still using Padrino.
I just completed the blog tutorial. I had a couple of issue, like those mentioned in the comment below the tutorial itself. But I also had one issue with the heroku part.
heroku run rake ar:migrate
would not run (pg didn't seem to be installed).
Gem::LoadError: Specified 'postgresql' for database adapter, but the gem is not loaded. Add
gem 'pg' to your Gemfile (and ensure its version is at the minimum required by ActiveRecord).
I installed postgres-dev package locally and ran a bundle --with production
, and then checked in that updated Gemfile.lock
. (I did not switch :development away from sqlite3.)
Then heroku seemed to get postgresql installed and everything ran as planned.
http://padrinorb.com/guides/examples/ is pretty empty. Should we add the link to the guides? I think so. We should add the content from https://github.com/padrino/padrino-framework/wiki/Projects-using-Padrino, or?
padrino g project sample_blog --template sampleblog. See the details under https://github.com/padrino/padrino-recipes/blob/master/templates/sampleblog_template.rb. Most issues arise from AR.
Details under padrino/padrino-framework@d7214ee
Based on https://twitter.com/dsabar/status/727737356317495297 we have the following new apps:
Would be nice if the examples can be added to the examples.
http://www.padrinorb.com/blog/upgrading-padrino-from-0-11-x-to-0-12-0-guide results in a 404; it existed on the old site
Seem like the guide is not up to date and locales where removed :
padrino/padrino-framework@cec17d1
Why so? Are they replaced somehow?
https://github.com/padrino/padrino-docs/blob/master/guides/localization.textile
cc @WaYdotNET
While fixing some broken links in padrino/pardino-framework's README I came across a broken link to an old FAQ page.
Looking through this repo it appears the FAQ page was removed and I can't tell if that was on purpose or not... If it was please close this issue. If not, then we should investigate building out an extensive list of questions/answers.
For now I've removed the FAQ reference from padrino/pardino-framework's README. PR here: Fixing all the broken links
We should use this repo also to generate a Man file (maybe with docco/rocco) among our Padrino binaries ;)
Lots of good stuff on the old why page.
Have we lost this now?
Also a dead link pointing to it in the getting started section
Idea comes from http://awesome-hanami.org/#awesome-hanami
On discussing difficulty in navigation guide pages (from padrino/padrino-web#18):
Rather than discussing issues with the proposed solution, let's discuss problems with the current implementation.
- Guides are very long with many sections.
- Content width is somewhat narrow, especially for the font size.
- Guides are listed all together rather than by type or logical progression.
These are fairly easy problems to solve:
- Separate guides into smaller sub-guides. Content would be the same, but broken into multiple pages. See Lotus's docs for an example.
- Increase overall maximum page width. Since the CSS is set using Susy and percentages, everything should scale nicely automatically.
- Add sub-headers to the guides and break them into logical categories. Again, see Lotus's docs for an example.
These structural solutions should, in theory, make a TOC unnecessary. I feel this is a better solution, but I'd like to hear others' opinions.
The docs were separated from the website in this repository to allow us to maintain documentation without caring about the website's implementation. Thus, we should make these organizational changes here first.
As a side effect, this should allow the docs to remove files like _sidebar.slim as it is website logic.
Should we just delete the broken ones and/or search for new ones?
http://www.padrinorb.com/pages/why - the link is mentioned under getting-started/ page. Think this is important and we should fix it.
I figure out that project generator configuration option list is missing --migration-format=timestamp
option. I wanted to create a pull request but I don't know neither Default
value nor Aliases
for migration format.
I ran through the blog tutorial to verify accuracy, and I made a few observations that could translate into improvements.
As this step technically isn't needed to complete the tutorial, I can't help but wonder if it should just be removed. As the values won't match up to what the user would be seeing, I wonder if it might be a source of confusion to newcomers.
Looks like default_dependency_paths
already includes this path, allowing us to remove this step.
bundle exec rake
or padrino rake
I've never seen padrino rake
until following the tutorial. Maybe someone else can advise whether one or the other is better suited.
db/seeds.rb
I was prompted for a username and password when seeding. I think this can be safely removed.
I'm willing to take care of these items, barring no objections from the core team.
Found on the article running-padrino-on-jruby
it says You can run Padrino (0.9.29 / 0.10.3 is tested) on JRuby 1.6.4. Maybe we can update this.
Can I try to write it?
Finally, our basic blog has been built and we should deploy our application so
the world can check it out! The easiest way to do this quickly and for free is
to use a service such as Heroku. Let's deploy our application to Heroku right
now.
The best way to get started using Heroku is by following the
Heroku Quickstart Guide. As explained in the guide, be sure to have Git installed and
setup a Heroku account as
well as
install the Heroku command-line tool before continuing this tutorial.
Now, to deploy to Heroku, the application needs to be set up as a Git
repository:
$ cd sample-blog-updated
$ git init
$ git add .
$ git commit -m "initial commit for app"
This initializes the Git repository, adds all the contents and commit them to
the repo.
Currently Padrino defaults to SQLite but Heroku only supports
PostgreSQL, so we'll need to add pg
gem as a dependency for production as well add sqlite3
for development.
# Gemfile
group :development do
gem 'sqlite3'
end
group :production do
gem 'pg'
end
Now you can bundle :
$ bundle
and then commit these changes to your git repository:
$ git add --all
$ git commit -m "added pg dependency"
Next, the application must be set up on Heroku.
$ heroku login
Enter your Heroku credentials.
Email: <your-email>
Password (typing will be hidden):
Logged in as <your-email>
$ heroku create
Creating app... done, ⬢ secret-taiga-32690
https://secret-taiga-32690.herokuapp.com/ | https://git.heroku.com/secret-taiga-32690.git
$ git push heroku master
That's it, your app is now running on Heroku! To see if we have a database addon connected
to out heroku app, run heroku addons
:
$ heroku addons
Add-on Plan Price
─────────────────────────────────────────── ───────── ─────
heroku-postgresql (postgresql-taiga-32690) hobby-dev free
└─ as DATABASE
and configure the config/database.rb
for production:
# config/database.rb
Sequel::Model.plugin(:schema)
Sequel::Model.raise_on_save_failure = false # Do not throw exceptions on failure
Sequel::Model.db = case Padrino.env
when :development then Sequel.connect("sqlite://db/blog_tutorial_development.db", :loggers => [logger])
when :production then Sequel.connect("<your-url>", :loggers => [logger])
when :test then Sequel.connect("sqlite://db/blog_tutorial_test.db", :loggers => [logger])
end
You can get the value of <your-url>
via heroku config
.
Run heroku open
to open your site in your default web browser.
Now run our migrations/seeds
:
$ heroku run rake sq:migrate
$ heroku run rake sq:seed
You'll see something like:
$ heroku run rake ar:migrate
Running rake ar:migrate on calm-tor-92217.... up, run.7316
== 1 CreateAccounts: migrating ================================================
-- create_table(:accounts)
-> 0.0162s
== 1 CreateAccounts: migrated (0.0164s) =======================================
== 2 CreatePosts: migrating ===================================================
-- create_table(:posts)
-> 0.0078s
== 2 CreatePosts: migrated (0.0080s) ==========================================
== 3 AddAccountToPost: migrating ==============================================
-- change_table(:posts)
-> 0.0048s
== 3 AddAccountToPost: migrated (0.0254s) =====================================
$ heroku run rake seed
Running rake seed on calm-tor-92217.... up, run.9169
Which email do you want use for logging into admin?
Tell me the password to use:
=================================================================
Account has been successfully created, now you can login with:
=================================================================
email: [email protected]
password: *****
=================================================================
Now let's open our newly deployed app:
$ heroku open
and surf. You can see posts and the
admin screen.
Enjoy!
Write a little blog post about the integration. Details under http://devdocs.io/, https://github.com/rhysd/devdocs.vim, freeCodeCamp/devdocs#667 (comment)
The old version is listed on http://padrinorb.com/guides/introduction/why-learn-padrino/ and points to https://github.com/DAddYE/web-frameworks-benchmark/wiki which is over 5 years.
A new version: https://github.com/luislavena/bench-micro. What do you think?
"Rails 3 is working towards true fully mountable applications, but Padrino has them right now out of the box and with virtually no extra effort."
Rails 3 is out and so are engines. Is the purpose of this sentence to state that engines are not "fully" mountable applications or was this created when Rails 3 was still in development and it needs to be updated?
From @fgarcia on September 9, 2014 14:37
I am not having the behavior I expected from the fields_for
form helper. This is what I am trying to do (Slim template):
= form_tag '/form/posted' do
= fields_for :model do |f|
= f.label :email
= f.text_field :email
The text field above is generated as:
<input type="text" name="object[email]" value="" id="object_email">
I expected the field to be inside 'model', not inside 'object':
<input type="text" name="model[email]" value="" id="object_email">
Also I cannot nest again inside like this:
= f.fields_for :inside do |ff|
= ff.text_field :bar
With that I get the error undefined method 'inside'
and my expected output was:
<input type="text" name="model[inside][bar]" id="...">
Maybe I am doing something wrong expecting something similar to the rails helpers, so any advice using these helpers to get nested forms (without object) would be welcome.
Copied from original issue: padrino/padrino-framework#1760
On this page http://www.padrinorb.com/guides/localization
In the Provide your translations section
The link to padrino-core.yml is broken
https://raw.github.com/padrino/padrino-framework/master/padrino-core/lib/padrino-core/locale/en.yml
Right now this isn't tied to the actual content in padrino-admin at all right? What's your plan for this?
Many of the links are dead and we cannot easily restore these old comments. My suggestion is to remove this setting.
We have to disable the "Discovery" option (which is gone after some update https://disqus.com/home/channel/discussdisqus/discussion/channel-discussdisqus/why_i_cant_find_discovery_option_in_my_site_admin_setting/
)
@padrino/collaborators @angeloashmore what do you think?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.